lib/strings: add concatLines
Like `unlines` from Haskell. The aim is to replace the `concatStringsSep "\n"` pattern for generated files, which doesn't add a final newline.
This commit is contained in:
@@ -153,6 +153,11 @@ runTests {
|
||||
expected = "a,b,c";
|
||||
};
|
||||
|
||||
testConcatLines = {
|
||||
expr = concatLines ["a" "b" "c"];
|
||||
expected = "a\nb\nc\n";
|
||||
};
|
||||
|
||||
testSplitStringsSimple = {
|
||||
expr = strings.splitString "." "a.b.c.d";
|
||||
expected = [ "a" "b" "c" "d" ];
|
||||
|
||||
Reference in New Issue
Block a user