diff --git a/tests/reftests/env.test b/tests/reftests/env.test index bf5248fd2de..f2fd9f72583 100644 --- a/tests/reftests/env.test +++ b/tests/reftests/env.test @@ -89,6 +89,12 @@ setenv: [ [ NV_VARS8 =+ "foo" ] [ NV_VARS9 = "" ] [ NV_VARS9 =: "foo" ] + [ NV_VARS10 := "a" ] + [ NV_VARS10 =: "b" ] + [ NV_VARS11 =: "a" ] + [ NV_VARS11 := "b" ] + [ NV_VARS12 := "a" ] + [ NV_VARS13 =: "b" ] ] flags: compiler ### opam switch create emptyvar nv @@ -101,6 +107,10 @@ Switch invariant: ["nv"] Done. ### opam exec -- env | grep "NV_VARS" | ';' -> ':' NV_VARS= +NV_VARS10=:a:b +NV_VARS11=:b:a +NV_VARS12=a: +NV_VARS13=:b NV_VARS3=foo: NV_VARS4= NV_VARS6=foo: @@ -114,6 +124,10 @@ NV_VARS6='foo:': export NV_VARS6: NV_VARS7='foo:': export NV_VARS7: NV_VARS8=':foo': export NV_VARS8: NV_VARS9=':foo': export NV_VARS9: +NV_VARS10=':a:b': export NV_VARS10: +NV_VARS11=':b:a': export NV_VARS11: +NV_VARS12='a:': export NV_VARS12: +NV_VARS13=':b': export NV_VARS13: ### opam exec -- opam env --revert | grep "NV_VARS" | ';' -> ':' NV_VARS3='': export NV_VARS3: NV_VARS4='': export NV_VARS4: @@ -121,12 +135,20 @@ NV_VARS6='': export NV_VARS6: NV_VARS7='': export NV_VARS7: NV_VARS8='': export NV_VARS8: NV_VARS9='': export NV_VARS9: +NV_VARS10='': export NV_VARS10: +NV_VARS11='': export NV_VARS11: +NV_VARS12='': export NV_VARS12: +NV_VARS13='': export NV_VARS13: ### NV_VARS=/another/path ### NV_VARS2=/another/different/path ### NV_VARS3=/yet/another/different/path ### NV_VARS4=ignored-value ### opam exec -- env | grep "NV_VARS" | ';' -> ':' NV_VARS=/another/path +NV_VARS10=:a:b +NV_VARS11=:b:a +NV_VARS12=a: +NV_VARS13=:b NV_VARS2=/another/different/path NV_VARS3=foo:/yet/another/different/path NV_VARS4= @@ -141,6 +163,10 @@ NV_VARS6='foo:': export NV_VARS6: NV_VARS7='foo:': export NV_VARS7: NV_VARS8=':foo': export NV_VARS8: NV_VARS9=':foo': export NV_VARS9: +NV_VARS10=':a:b': export NV_VARS10: +NV_VARS11=':b:a': export NV_VARS11: +NV_VARS12='a:': export NV_VARS12: +NV_VARS13=':b': export NV_VARS13: ### opam exec -- opam env --revert | grep "NV_VARS" | ';' -> ':' NV_VARS3='/yet/another/different/path': export NV_VARS3: NV_VARS4='': export NV_VARS4: @@ -148,6 +174,10 @@ NV_VARS6='': export NV_VARS6: NV_VARS7='': export NV_VARS7: NV_VARS8='': export NV_VARS8: NV_VARS9='': export NV_VARS9: +NV_VARS10='': export NV_VARS10: +NV_VARS11='': export NV_VARS11: +NV_VARS12='': export NV_VARS12: +NV_VARS13='': export NV_VARS13: ### : Full revert of uninstalled package with setenv : ### opam-version: "2.0" @@ -207,6 +237,10 @@ NV_VARS6='foo:': export NV_VARS6: NV_VARS7='foo:': export NV_VARS7: NV_VARS8=':foo': export NV_VARS8: NV_VARS9=':foo': export NV_VARS9: +NV_VARS10=':a:b': export NV_VARS10: +NV_VARS11=':b:a': export NV_VARS11: +NV_VARS12='a:': export NV_VARS12: +NV_VARS13=':b': export NV_VARS13: ### OPAMNOENVNOTICE=1 ### : Env hooks : ###