aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-10-30 21:02:51 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-10-30 21:02:51 -0400
commitc9c282cea04ec5a3ee7bd17e6ad8846600220feb (patch)
tree7714b28669469994919ab41331e8a27d38af4368 /tests
parent4fca58a6c6f0a5c7d3ac2363557fabeb6524865d (diff)
downloadguix-c9c282cea04ec5a3ee7bd17e6ad8846600220feb.tar
guix-c9c282cea04ec5a3ee7bd17e6ad8846600220feb.tar.gz
scripts: environment: Allow lists of packages in expressions.
* guix/scripts/environment.scm (options/resolve-packages): Match against lists of packages when evaluating expressions. * tests/guix-environment.sh: Add test. * doc/guix.texi ("invoking guix environment"): Add docs.
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-environment.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index 49b3b1ccc3..f7b0259e1b 100644
--- a/tests/guix-environment.sh
+++ b/tests/guix-environment.sh
@@ -111,4 +111,15 @@ then
grep -E '^export CPATH=.*-gcc-bootstrap-0/include' "$tmpdir/a"
grep -E '^export CPATH=.*-glibc-bootstrap-0/include' "$tmpdir/a"
grep -E '^export LIBRARY_PATH=.*-glibc-bootstrap-0/lib' "$tmpdir/a"
+
+ # Make sure a package list can be used with -e.
+ expr_list_test_code="
+(list (@@ (gnu packages commencement) gnu-make-boot0)
+ (@ (gnu packages bootstrap) %bootstrap-guile))"
+
+ guix environment --ad-hoc --no-substitutes --search-paths --pure \
+ -e "$expr_list_test_code" > "$tmpdir/a"
+
+ grep -E '^export PATH=.*-make-boot0-4.1/bin' "$tmpdir/a"
+ grep -E '^export PATH=.*-guile-bootstrap-2.0/bin' "$tmpdir/a"
fi