@@ -46,31 +46,31 @@ fn test_eq() {
46
46
47
47
#[ test]
48
48
fn test_comparator ( ) {
49
- let compatator = comparator ( "4.4.5-44 " ) ;
50
- assert_to_string ( compatator , "^4.4.5-44 " ) ;
49
+ let parsed = comparator ( "1.2.3-alpha " ) ;
50
+ assert_to_string ( parsed , "^1.2.3-alpha " ) ;
51
51
52
- let compatator = comparator ( "2.X" ) ;
53
- assert_to_string ( compatator , "2.*" ) ;
52
+ let parsed = comparator ( "2.X" ) ;
53
+ assert_to_string ( parsed , "2.*" ) ;
54
54
55
- let compatator = comparator ( "2" ) ;
56
- assert_to_string ( compatator , "^2" ) ;
55
+ let parsed = comparator ( "2" ) ;
56
+ assert_to_string ( parsed , "^2" ) ;
57
57
58
- let compatator = comparator ( "5 .x.x" ) ;
59
- assert_to_string ( compatator , "5 .*" ) ;
58
+ let parsed = comparator ( "2 .x.x" ) ;
59
+ assert_to_string ( parsed , "2 .*" ) ;
60
60
}
61
61
62
62
#[ test]
63
63
fn test_prerelease ( ) {
64
- let err = prerelease_err ( "88.6688.b.rrrrrrr8.b.6bbbbbbb66.66 \0 " ) ;
64
+ let err = prerelease_err ( "1.b \0 " ) ;
65
65
assert_to_string ( err, "unexpected character in pre-release identifier" ) ;
66
66
}
67
67
68
68
#[ test]
69
69
fn test_comparator_err ( ) {
70
- let err = comparator_err ( "4.4.4-012 " ) ;
70
+ let err = comparator_err ( "1.2.3-01 " ) ;
71
71
assert_to_string ( err, "invalid leading zero in pre-release identifier" ) ;
72
72
73
- let err = comparator_err ( "5.4.4 +4." ) ;
73
+ let err = comparator_err ( "1.2.3 +4." ) ;
74
74
assert_to_string ( err, "empty identifier segment in build metadata" ) ;
75
75
76
76
let err = comparator_err ( ">" ) ;
@@ -79,15 +79,15 @@ fn test_comparator_err() {
79
79
"unexpected end of input while parsing major version number" ,
80
80
) ;
81
81
82
- let err = comparator_err ( "4 ." ) ;
82
+ let err = comparator_err ( "1 ." ) ;
83
83
assert_to_string (
84
84
err,
85
85
"unexpected end of input while parsing minor version number" ,
86
86
) ;
87
87
88
- let err = comparator_err ( "4 .*." ) ;
88
+ let err = comparator_err ( "1 .*." ) ;
89
89
assert_to_string ( err, "unexpected character after wildcard in version req" ) ;
90
90
91
- let err = comparator_err ( "55444.4.45-6+6.4.5.45-5644ÿ " ) ;
91
+ let err = comparator_err ( "1.2.3+4ÿ " ) ;
92
92
assert_to_string ( err, "unexpected character 'ÿ' after build metadata" ) ;
93
93
}
0 commit comments