We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74275ad commit 2cb0a11Copy full SHA for 2cb0a11
1 file changed
compiler-cli/src/add.rs
@@ -133,3 +133,36 @@ fn version_to_string(version: &Version) -> String {
133
}
134
text
135
136
+
137
+#[test]
138
+fn displays_simple_version_correctly() {
139
+ let version = Version {
140
+ major: 1,
141
+ minor: 23,
142
+ patch: 4,
143
+ pre: vec![],
144
+ build: None,
145
+ };
146
147
+ let displayed = version_to_string(&version);
148
149
+ assert_eq!(displayed, "1.23.4");
150
+}
151
152
153
+fn displays_full_version_correctly() {
154
155
156
157
158
+ pre: vec![
159
+ Identifier::Numeric(123),
160
+ Identifier::AlphaNumeric("123abc".to_string()),
161
+ ],
162
+ build: Some("12345abc".to_string()),
163
164
165
166
167
+ assert_eq!(displayed, "1.23.4-123.123abc+12345abc");
168
0 commit comments