aboutsummaryrefslogtreecommitdiff
path: root/tests/lang
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-24 02:31:58 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-24 02:38:09 +0200
commit2e8fd4c5cdeb59ae2bd403aa5069993303e8388e (patch)
treef9d51f5420dcd986b7f581324e068ea9a822c4a1 /tests/lang
parentcb4320c1a0808fe88084d391341da86123b36e6a (diff)
Add concatStringsSep as a primop
This fixes the quadratic behaviour of concatStrings/concatStringsSep in Nixpkgs.
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/eval-okay-concatstringssep.exp1
-rw-r--r--tests/lang/eval-okay-concatstringssep.nix8
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-concatstringssep.exp b/tests/lang/eval-okay-concatstringssep.exp
new file mode 100644
index 000000000..93987647f
--- /dev/null
+++ b/tests/lang/eval-okay-concatstringssep.exp
@@ -0,0 +1 @@
+[ "" "foobarxyzzy" "foo, bar, xyzzy" "foo" "" ]
diff --git a/tests/lang/eval-okay-concatstringssep.nix b/tests/lang/eval-okay-concatstringssep.nix
new file mode 100644
index 000000000..adc4c41bd
--- /dev/null
+++ b/tests/lang/eval-okay-concatstringssep.nix
@@ -0,0 +1,8 @@
+with builtins;
+
+[ (concatStringsSep "" [])
+ (concatStringsSep "" ["foo" "bar" "xyzzy"])
+ (concatStringsSep ", " ["foo" "bar" "xyzzy"])
+ (concatStringsSep ", " ["foo"])
+ (concatStringsSep ", " [])
+]