aboutsummaryrefslogtreecommitdiffstats
path: root/test/testdata/eval-okay-replacestrings.nix
diff options
context:
space:
mode:
Diffstat (limited to 'test/testdata/eval-okay-replacestrings.nix')
-rw-r--r--test/testdata/eval-okay-replacestrings.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/testdata/eval-okay-replacestrings.nix b/test/testdata/eval-okay-replacestrings.nix
new file mode 100644
index 0000000..a803e65
--- /dev/null
+++ b/test/testdata/eval-okay-replacestrings.nix
@@ -0,0 +1,12 @@
1with builtins;
2
3[ (replaceStrings ["o"] ["a"] "foobar")
4 (replaceStrings ["o"] [""] "foobar")
5 (replaceStrings ["oo"] ["u"] "foobar")
6 (replaceStrings ["oo" "a"] ["a" "oo"] "foobar")
7 (replaceStrings ["oo" "oo"] ["u" "i"] "foobar")
8 (replaceStrings [""] ["X"] "abc")
9 (replaceStrings [""] ["X"] "")
10 (replaceStrings ["-"] ["_"] "a-b")
11 (replaceStrings ["oo" "XX"] ["u" (throw "unreachable")] "foobar")
12]