mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
Add concatStringsSep as a primop
This fixes the quadratic behaviour of concatStrings/concatStringsSep in Nixpkgs.
This commit is contained in:
parent
cb4320c1a0
commit
2e8fd4c5cd
3 changed files with 30 additions and 0 deletions
1
tests/lang/eval-okay-concatstringssep.exp
Normal file
1
tests/lang/eval-okay-concatstringssep.exp
Normal file
|
@ -0,0 +1 @@
|
|||
[ "" "foobarxyzzy" "foo, bar, xyzzy" "foo" "" ]
|
8
tests/lang/eval-okay-concatstringssep.nix
Normal file
8
tests/lang/eval-okay-concatstringssep.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
with builtins;
|
||||
|
||||
[ (concatStringsSep "" [])
|
||||
(concatStringsSep "" ["foo" "bar" "xyzzy"])
|
||||
(concatStringsSep ", " ["foo" "bar" "xyzzy"])
|
||||
(concatStringsSep ", " ["foo"])
|
||||
(concatStringsSep ", " [])
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue