diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-16T22·45+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-16T22·51+0200 |
commit | 9d8a80375d2d0581b53d270eb4d543fa0d3f0190 (patch) | |
tree | c289a41aeb0ce44b7b41938b8a7516325a5f1c9c /tests/lang | |
parent | d6a7aa8f4827f97856ed55226426c355e1d1b4d1 (diff) |
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.
Diffstat (limited to 'tests/lang')
-rw-r--r-- | tests/lang/eval-fail-bad-antiquote-1.nix | 1 | ||||
-rw-r--r-- | tests/lang/eval-fail-bad-antiquote-2.nix | 1 | ||||
-rw-r--r-- | tests/lang/eval-fail-bad-antiquote-3.nix | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/tests/lang/eval-fail-bad-antiquote-1.nix b/tests/lang/eval-fail-bad-antiquote-1.nix new file mode 100644 index 000000000000..ffe9c983c26b --- /dev/null +++ b/tests/lang/eval-fail-bad-antiquote-1.nix @@ -0,0 +1 @@ +"${x: x}" diff --git a/tests/lang/eval-fail-bad-antiquote-2.nix b/tests/lang/eval-fail-bad-antiquote-2.nix new file mode 100644 index 000000000000..3745235ce95e --- /dev/null +++ b/tests/lang/eval-fail-bad-antiquote-2.nix @@ -0,0 +1 @@ +"${./fnord}" diff --git a/tests/lang/eval-fail-bad-antiquote-3.nix b/tests/lang/eval-fail-bad-antiquote-3.nix new file mode 100644 index 000000000000..65b9d4f505b1 --- /dev/null +++ b/tests/lang/eval-fail-bad-antiquote-3.nix @@ -0,0 +1 @@ +''${x: x}'' |