about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-02-17T17·03+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-02-17T17·03+0000
commit4ddd5ff39cddf46acb23eedc9638f9709da0c47d (patch)
tree965d92bcbd7ae920892d659eb9bf82ef85a5482f
parent889ef564fd0aca2814659f28fc7b9dc0191a6656 (diff)
* Regression test for NIX-31.
-rw-r--r--tests/user-envs.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/user-envs.sh b/tests/user-envs.sh
index 01d2d90d6785..4f94690d8378 100644
--- a/tests/user-envs.sh
+++ b/tests/user-envs.sh
@@ -75,3 +75,19 @@ $nixenv -p $profiles/test --delete-generations old
 $NIX_BIN_DIR/nix-collect-garbage
 test -e "$outPath10"
 if test -e "$outPath20"; then false; fi
+
+# Uninstall everything
+$nixenv -p $profiles/test -f ./user-envs.nix -e '*'
+test "$($nixenv -p $profiles/test -q | wc -l)" -eq 0
+
+# Installing "foo" should only install the newest foo.
+$nixenv -p $profiles/test -f ./user-envs.nix -i foo
+test "$($nixenv -p $profiles/test -q | grep foo- | wc)" -eq 1
+$nixenv -p $profiles/test -q | grep -q foo-2.0
+
+# Installing "*" should install one foo and one bar.
+$nixenv -p $profiles/test -f ./user-envs.nix -e '*'
+$nixenv -p $profiles/test -f ./user-envs.nix -i '*'
+test "$($nixenv -p $profiles/test -q | wc)" -eq 2
+$nixenv -p $profiles/test -q | grep -q foo-2.0
+$nixenv -p $profiles/test -q | grep -q bar-0.1.1