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) {
9999 good := []goodStringTest {
100100 {"" , "" }, // always true
101101 {"=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)" },
102105 {"1.3.0" , "^1.3.0" },
103106 {"!1.0.0" , "!(^1.0.0)" },
104107 {" =1.3.0 " , "=1.3.0" },
@@ -143,6 +146,8 @@ func TestConstraintsParser(t *testing.T) {
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)" },
145148 {">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)" },
146151 {"((>1.0.0) || (2.0.0))" , "(>1.0.0 || ^2.0.0)" },
147152 {"((>1.0.0) || (=2.0.0))" , "(>1.0.0 || =2.0.0)" },
148153 }
@@ -159,6 +164,7 @@ func TestConstraintsParser(t *testing.T) {
159164
160165 bad := []string {
161166 "= 1.0.0" ,
167+ "!= 1.3.9" ,
162168 ">= 1.0.0" ,
163169 "> 1.0.0" ,
164170 "<= 1.0.0" ,
You can’t perform that action at this time.
0 commit comments