gnu: linux-libre@5.4: Update to 5.4.66.
[jackhill/guix/guix.git] / tests / guix-environment-container.sh
index 32a5ba1..45264d4 100644 (file)
@@ -24,7 +24,7 @@ set -e
 
 guix environment --version
 
-if ! guile -c '((@@ (guix scripts environment) assert-container-features))'
+if ! guile -c '((@ (guix scripts environment) assert-container-features))'
 then
     # User containers are not supported; skip this test.
     exit 77
@@ -44,6 +44,11 @@ else
     test $? = 42
 fi
 
+# Make sure '--preserve' is honored.
+result="`FOOBAR=42; export FOOBAR; guix environment -C --ad-hoc --bootstrap \
+   guile-bootstrap -E ^FOO -- guile -c '(display (getenv \"FOOBAR\"))'`"
+test "$result" = "42"
+
 # By default, the UID inside the container should be the same as outside.
 uid="`id -u`"
 inner_uid="`guix environment -C --ad-hoc --bootstrap guile-bootstrap \