aboutsummaryrefslogtreecommitdiff
path: root/tests/lang/eval-okay-replacestrings.nix
blob: bd8031fc004e32a6169698f6ec8b562630795be7 (plain)
1
2
3
4
5
6
7
8
9
10
11
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")
]