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) {
9898 good := []goodStringTest {
9999 {"" , "" }, // always true
100100 {"=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)" },
101104 {"1.3.0" , "^1.3.0" },
102105 {"!1.0.0" , "!(^1.0.0)" },
103106 {" =1.3.0 " , "=1.3.0" },
@@ -142,6 +145,8 @@ func TestConstraintsParser(t *testing.T) {
142145 {"(>1.0.0) || =2.0.0" , "(>1.0.0 || =2.0.0)" },
143146 {">1.0.0 || (2.0.0)" , "(>1.0.0 || ^2.0.0)" },
144147 {">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)" },
145150 {"((>1.0.0) || (2.0.0))" , "(>1.0.0 || ^2.0.0)" },
146151 {"((>1.0.0) || (=2.0.0))" , "(>1.0.0 || =2.0.0)" },
147152 }
@@ -158,6 +163,7 @@ func TestConstraintsParser(t *testing.T) {
158163
159164 bad := []string {
160165 "= 1.0.0" ,
166+ "!= 1.3.9" ,
161167 ">= 1.0.0" ,
162168 "> 1.0.0" ,
163169 "<= 1.0.0" ,
You can’t perform that action at this time.
0 commit comments