about summary refs log tree commit diff
path: root/tests/user-envs.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-05-21T10·04+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-05-21T10·04+0200
commita1c1bf3a56fbe7c01dd86fa6b089a2a281f00fc4 (patch)
treec91c4c2db02d1f2e9bea4c7ec03352f7b41160bc /tests/user-envs.sh
parent1529db702b8eaf7b5699f08034ac3b501068d26d (diff)
parent12a888894bc528fbfa9d4c1ef2dbeb5909550894 (diff)
Merge branch 'submit/sparse-generation-symlinks' of https://github.com/ctheune/nix
Diffstat (limited to 'tests/user-envs.sh')
-rw-r--r--tests/user-envs.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/user-envs.sh b/tests/user-envs.sh
index c9eed5a6633d..5e4fcb7bc7f5 100644
--- a/tests/user-envs.sh
+++ b/tests/user-envs.sh
@@ -99,6 +99,16 @@ if nix-env -q '*' | grep -q bar; then false; fi
 nix-env --list-generations
 test "$(nix-env --list-generations | wc -l)" -eq 7
 
+# Doing the same operation twice results in the same generation, which triggers
+# "lazy" behaviour and does not create a new symlink.
+
+nix-env -i foo
+nix-env -i foo
+
+# Count generations.
+nix-env --list-generations
+test "$(nix-env --list-generations | wc -l)" -eq 8
+
 # Switch to a specified generation.
 nix-env --switch-generation 7
 [ "$(nix-store -q --resolve $profiles/test)" = "$oldGen" ]