about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-18T19·14+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-18T19·16+0100
commitfc33fd86b7727365caab44c05a90d5b52209131b (patch)
treeba12d5e943e0e3b0d9aa5a9e25f1fa784dc369f0 /tests
parent90b5e692846d9b7a951155c5ed4fc7cf72b08e31 (diff)
Add a symbol __curPos that expands to the current source location
I.e. an attribute set { file = <string>; line = <int>; column = <int>; }.
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/eval-okay-curpos.exp1
-rw-r--r--tests/lang/eval-okay-curpos.nix5
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-curpos.exp b/tests/lang/eval-okay-curpos.exp
new file mode 100644
index 000000000000..65fd65b4d01f
--- /dev/null
+++ b/tests/lang/eval-okay-curpos.exp
@@ -0,0 +1 @@
+[ 3 7 4 9 ]
diff --git a/tests/lang/eval-okay-curpos.nix b/tests/lang/eval-okay-curpos.nix
new file mode 100644
index 000000000000..b79553df0bd3
--- /dev/null
+++ b/tests/lang/eval-okay-curpos.nix
@@ -0,0 +1,5 @@
+# Bla
+let
+  x = __curPos;
+    y = __curPos;
+in [ x.line x.column y.line y.column ]