aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-environment.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-07 22:51:33 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-08 00:06:45 +0200
commit4931dfcdfdbe9beaf829607429aec6af6a4dac1c (patch)
tree279c2cf9d79671901b7ababe6ed467ddaf36f362 /tests/guix-environment.sh
parenta8afb9aed320d3d3ce026936cd5fc2bdd65b331b (diff)
downloadguix-4931dfcdfdbe9beaf829607429aec6af6a4dac1c.tar
guix-4931dfcdfdbe9beaf829607429aec6af6a4dac1c.tar.gz
tests: Test the exit code of 'guix environment'.
This is a followup to d2cef62. * tests/guix-environment.sh: Add test for the exit code.
Diffstat (limited to 'tests/guix-environment.sh')
-rw-r--r--tests/guix-environment.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index 08c97cbb65..32faf71a4e 100644
--- a/tests/guix-environment.sh
+++ b/tests/guix-environment.sh
@@ -39,6 +39,14 @@ test "`wc -l < "$tmpdir/a"`" = 1
cmp "$tmpdir/a" "$tmpdir/b"
+# Make sure the exit value is preserved.
+if guix environment --ad-hoc guile-bootstrap --pure -E 'guile -c "(exit 42)"'
+then
+ false
+else
+ test $? = 42
+fi
+
if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null
then
# Compute the build environment for the initial GNU Make.