aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-12-26 19:11:27 +0100
committerLudovic Courtès <ludo@gnu.org>2023-01-05 14:20:23 +0100
commit73684dc90e013f2f0cca1097b0c944bb9aa88709 (patch)
tree4fddd86a52031d96cbb8fb2716f87e97f1507470 /tests
parent2c757e8fb4385f889ec91f02b77acdf27143c316 (diff)
downloadguix-73684dc90e013f2f0cca1097b0c944bb9aa88709.tar
guix-73684dc90e013f2f0cca1097b0c944bb9aa88709.tar.gz
home: services: environment-variables: Add support for literal strings.
* gnu/home/services.scm (<literal-string>): New record type. (environment-variable-shell-definitions): Split 'shell-quote' into 'quote-string' and 'shell-double-quote'. Add 'shell-single-quote'. Add clause for 'literal-string' records. * tests/guix-home.sh: Test it. * doc/guix.texi (Essential Home Services): Document it.
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-home.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/guix-home.sh b/tests/guix-home.sh
index d5e2dadbb5..423ebf6f33 100644
--- a/tests/guix-home.sh
+++ b/tests/guix-home.sh
@@ -81,7 +81,8 @@ trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT
(simple-service 'add-environment-variable
home-environment-variables-service-type
- '(("TODAY" . "26 messidor")))
+ `(("TODAY" . "26 messidor")
+ ("LITERAL" . ,(literal-string "${abc}"))))
(simple-service 'home-bash-service-extension-test
home-bash-service-type
@@ -149,6 +150,7 @@ EOF
grep -q "the content of ~/.config/test.conf" "${HOME}/.config/test.conf"
grep '^export PS1="\$GUIX_ENVIRONMENT λ "$' "${HOME}/.bash_profile"
( . "${HOME}/.guix-home/setup-environment"; test "$TODAY" = "26 messidor" )
+ ( . "${HOME}/.guix-home/setup-environment"; test "$LITERAL" = '${abc}' )
# This one should still be here.
grep "stay around" "$HOME/.config/random-file"