aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-04-09 22:42:20 +0200
committerRobert Hensing <robert@roberthensing.nl>2023-04-09 22:42:20 +0200
commit4e0804c920558575a4b3486df1e595445bf67555 (patch)
tree9dbeb968bb9c3d4a1bc02b49ab2ff219f8e1f065 /tests
parent8f0ec323ea0cb4791ca8edfe122b0d7523acfc80 (diff)
Deduplicate string literal rendering, fix 4909
Diffstat (limited to 'tests')
-rw-r--r--tests/repl.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/repl.sh b/tests/repl.sh
index be8adb742..2b3789521 100644
--- a/tests/repl.sh
+++ b/tests/repl.sh
@@ -79,6 +79,14 @@ testReplResponse '
"result: ${a}"
' "result: 2"
+# check dollar escaping https://github.com/NixOS/nix/issues/4909
+# note the escaped \,
+# \\
+# because the second argument is a regex
+testReplResponse '
+"$" + "{hi}"
+' '"\\${hi}"'
+
testReplResponse '
drvPath
' '".*-simple.drv"' \