File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,9 @@ func TestConstraintsParser(t *testing.T) {
98
98
good := []goodStringTest {
99
99
{"" , "" }, // always true
100
100
{"=1.3.0" , "=1.3.0" },
101
+ {"!=1.3.0" , "!(=1.3.0)" },
102
+ {" !=1.3.0" , "!(=1.3.0)" },
103
+ {"! =1.3.0" , "!(=1.3.0)" },
101
104
{"1.3.0" , "^1.3.0" },
102
105
{"!1.0.0" , "!(^1.0.0)" },
103
106
{" =1.3.0 " , "=1.3.0" },
@@ -142,6 +145,8 @@ func TestConstraintsParser(t *testing.T) {
142
145
{"(>1.0.0) || =2.0.0" , "(>1.0.0 || =2.0.0)" },
143
146
{">1.0.0 || (2.0.0)" , "(>1.0.0 || ^2.0.0)" },
144
147
{">1.0.0 || (=2.0.0)" , "(>1.0.0 || =2.0.0)" },
148
+ {"!>1.0.0 || (=2.0.0)" , "(!(>1.0.0) || =2.0.0)" },
149
+ {"!(>1.0.0 || =2.0.0)" , "!(>1.0.0 || =2.0.0)" },
145
150
{"((>1.0.0) || (2.0.0))" , "(>1.0.0 || ^2.0.0)" },
146
151
{"((>1.0.0) || (=2.0.0))" , "(>1.0.0 || =2.0.0)" },
147
152
}
@@ -158,6 +163,7 @@ func TestConstraintsParser(t *testing.T) {
158
163
159
164
bad := []string {
160
165
"= 1.0.0" ,
166
+ "!= 1.3.9" ,
161
167
">= 1.0.0" ,
162
168
"> 1.0.0" ,
163
169
"<= 1.0.0" ,
You can’t perform that action at this time.
0 commit comments