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 @@ -99,6 +99,9 @@ func TestConstraintsParser(t *testing.T) {
99
99
good := []goodStringTest {
100
100
{"" , "" }, // always true
101
101
{"=1.3.0" , "=1.3.0" },
102
+ {"!=1.3.0" , "!(=1.3.0)" },
103
+ {" !=1.3.0" , "!(=1.3.0)" },
104
+ {"! =1.3.0" , "!(=1.3.0)" },
102
105
{"1.3.0" , "^1.3.0" },
103
106
{"!1.0.0" , "!(^1.0.0)" },
104
107
{" =1.3.0 " , "=1.3.0" },
@@ -143,6 +146,8 @@ func TestConstraintsParser(t *testing.T) {
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)" },
145
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)" },
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
{"((>1.0.0) || (=2.0.0))" , "(>1.0.0 || =2.0.0)" },
148
153
}
@@ -159,6 +164,7 @@ func TestConstraintsParser(t *testing.T) {
159
164
160
165
bad := []string {
161
166
"= 1.0.0" ,
167
+ "!= 1.3.9" ,
162
168
">= 1.0.0" ,
163
169
"> 1.0.0" ,
164
170
"<= 1.0.0" ,
You can’t perform that action at this time.
0 commit comments