mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
Add a test for type correctness of antiquotes
Antiquotes should evaluate to strings or paths. This is usually checked, except in the case where the antiquote makes up the entire string, as in "${expr}". This is optimised to expr, which discards the runtime type checks / coercions.
This commit is contained in:
parent
d6a7aa8f48
commit
9d8a80375d
3 changed files with 3 additions and 0 deletions
1
tests/lang/eval-fail-bad-antiquote-1.nix
Normal file
1
tests/lang/eval-fail-bad-antiquote-1.nix
Normal file
|
@ -0,0 +1 @@
|
|||
"${x: x}"
|
1
tests/lang/eval-fail-bad-antiquote-2.nix
Normal file
1
tests/lang/eval-fail-bad-antiquote-2.nix
Normal file
|
@ -0,0 +1 @@
|
|||
"${./fnord}"
|
1
tests/lang/eval-fail-bad-antiquote-3.nix
Normal file
1
tests/lang/eval-fail-bad-antiquote-3.nix
Normal file
|
@ -0,0 +1 @@
|
|||
''${x: x}''
|
Loading…
Reference in a new issue