diff options
Diffstat (limited to 'tests/functional/lang/eval-okay-replacestrings.nix')
-rw-r--r-- | tests/functional/lang/eval-okay-replacestrings.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/functional/lang/eval-okay-replacestrings.nix b/tests/functional/lang/eval-okay-replacestrings.nix new file mode 100644 index 000000000..a803e6519 --- /dev/null +++ b/tests/functional/lang/eval-okay-replacestrings.nix @@ -0,0 +1,12 @@ +with builtins; + +[ (replaceStrings ["o"] ["a"] "foobar") + (replaceStrings ["o"] [""] "foobar") + (replaceStrings ["oo"] ["u"] "foobar") + (replaceStrings ["oo" "a"] ["a" "oo"] "foobar") + (replaceStrings ["oo" "oo"] ["u" "i"] "foobar") + (replaceStrings [""] ["X"] "abc") + (replaceStrings [""] ["X"] "") + (replaceStrings ["-"] ["_"] "a-b") + (replaceStrings ["oo" "XX"] ["u" (throw "unreachable")] "foobar") +] |