diff options
| author | Andrew Tropin <andrew@trop.in> | 2023-01-09 12:22:56 +0400 |
|---|---|---|
| committer | Andrew Tropin <andrew@trop.in> | 2023-01-09 12:22:56 +0400 |
| commit | 35ecbb418c03e3957ebab87af921742466fe2de9 (patch) | |
| tree | a8e524be0b4167b67ab539285476edbd6fd00cb1 /tests | |
| parent | 2acce55a00df9344d73101bb57a3961ba86105b0 (diff) | |
home: environment-variables: Fix escaping.
* gnu/home/services.scm (environment-variable-shell-definitions): Fix
escaping.
* tests/guix-home.sh: Add STRING_WITH_ESCAPES environment variable and test
its value.
Reported-by: elevnkb
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/guix-home.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/guix-home.sh b/tests/guix-home.sh index 83ca6e72c87..3151f666834 100644 --- a/tests/guix-home.sh +++ b/tests/guix-home.sh | |||
| @@ -84,8 +84,9 @@ trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT | |||
| 84 | home-environment-variables-service-type | 84 | home-environment-variables-service-type |
| 85 | `(("TODAY" . "26 messidor") | 85 | `(("TODAY" . "26 messidor") |
| 86 | ("SHELL" . ,(file-append bash "/bin/bash")) | 86 | ("SHELL" . ,(file-append bash "/bin/bash")) |
| 87 | ("BUILDHOSTTIME" . ,#~(strftime "%c" | 87 | ("BUILDHOST_TIME" . ,#~(strftime "%c" |
| 88 | (localtime (current-time)))) | 88 | (localtime (current-time)))) |
| 89 | ("STRING_WITH_ESCAPES" . "chars: \" /\\") | ||
| 89 | ("LITERAL" . ,(literal-string "${abc}")))) | 90 | ("LITERAL" . ,(literal-string "${abc}")))) |
| 90 | 91 | ||
| 91 | (simple-service 'home-bash-service-extension-test | 92 | (simple-service 'home-bash-service-extension-test |
| @@ -157,6 +158,8 @@ EOF | |||
| 157 | ( . "${HOME}/.guix-home/setup-environment"; test "$TODAY" = "26 messidor" ) | 158 | ( . "${HOME}/.guix-home/setup-environment"; test "$TODAY" = "26 messidor" ) |
| 158 | ( . "${HOME}/.guix-home/setup-environment"; test "$LITERAL" = '${abc}' ) | 159 | ( . "${HOME}/.guix-home/setup-environment"; test "$LITERAL" = '${abc}' ) |
| 159 | ( . "${HOME}/.guix-home/setup-environment"; | 160 | ( . "${HOME}/.guix-home/setup-environment"; |
| 161 | test "$STRING_WITH_ESCAPES" = "chars: \" /\\") | ||
| 162 | ( . "${HOME}/.guix-home/setup-environment"; | ||
| 160 | echo "$SHELL" | grep "/gnu/store/.*/bin/bash" ) | 163 | echo "$SHELL" | grep "/gnu/store/.*/bin/bash" ) |
| 161 | 164 | ||
| 162 | # This one should still be here. | 165 | # This one should still be here. |
