diff options
author | Alex Ameen <alex.ameen.tx@gmail.com> | 2023-05-09 10:06:26 -0500 |
---|---|---|
committer | Alex Ameen <alex.ameen.tx@gmail.com> | 2023-05-09 10:06:26 -0500 |
commit | 82d1d74a85bc3d06ff3b17e735deedd98eb47b66 (patch) | |
tree | 814470ccd866eabdb4f2734abc16e31b6219e193 /tests | |
parent | 82296f81130aacb774fba4683e2e655e51c0a210 (diff) |
quote subshell expansion in tests/eval.sh
Diffstat (limited to 'tests')
-rw-r--r-- | tests/eval.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/eval.sh b/tests/eval.sh index 0c1b2cf3a..066d8fc36 100644 --- a/tests/eval.sh +++ b/tests/eval.sh @@ -16,7 +16,7 @@ nix eval --expr 'assert 1 + 2 == 3; true' [[ $(nix eval int -f "./eval.nix") == 123 ]] [[ $(nix eval str -f "./eval.nix") == '"foo"' ]] [[ $(nix eval str --raw -f "./eval.nix") == 'foo' ]] -[[ $(nix eval attr -f "./eval.nix") == '{ foo = "bar"; }' ]] +[[ "$(nix eval attr -f "./eval.nix")" == '{ foo = "bar"; }' ]] [[ $(nix eval attr --json -f "./eval.nix") == '{"foo":"bar"}' ]] [[ $(nix eval int -f - < "./eval.nix") == 123 ]] [[ "$(nix eval --expr '{"assert"=1;bar=2;}')" == '{ "assert" = 1; bar = 2; }' ]] @@ -27,7 +27,7 @@ nix eval --expr 'assert 1 + 2 == 3; true' nix-instantiate --eval -E 'assert 1 + 2 == 3; true' [[ $(nix-instantiate -A int --eval "./eval.nix") == 123 ]] [[ $(nix-instantiate -A str --eval "./eval.nix") == '"foo"' ]] -[[ $(nix-instantiate -A attr --eval "./eval.nix") == '{ foo = "bar"; }' ]] +[[ "$(nix-instantiate -A attr --eval "./eval.nix")" == '{ foo = "bar"; }' ]] [[ $(nix-instantiate -A attr --eval --json "./eval.nix") == '{"foo":"bar"}' ]] [[ $(nix-instantiate -A int --eval - < "./eval.nix") == 123 ]] [[ "$(nix-instantiate --eval -E '{"assert"=1;bar=2;}')" == '{ "assert" = 1; bar = 2; }' ]] |