2024-06-30 08:16:52 +00:00
|
|
|
{
|
|
|
|
callPackage,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
runCommand,
|
|
|
|
concatText,
|
|
|
|
writeText,
|
|
|
|
hello,
|
|
|
|
emptyFile,
|
|
|
|
}:
|
2024-05-02 00:46:19 +00:00
|
|
|
let
|
|
|
|
stri = writeText "pathToTest";
|
|
|
|
txt1 = stri "abc";
|
|
|
|
txt2 = stri hello;
|
2024-06-30 08:16:52 +00:00
|
|
|
res = concatText "textToTest" [
|
|
|
|
txt1
|
|
|
|
txt2
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
in
|
|
|
|
runCommand "test-concatPaths" { } ''
|
|
|
|
diff -U3 <(cat ${txt1} ${txt2}) ${res}
|
2024-06-30 08:16:52 +00:00
|
|
|
diff -U3 ${concatText "void" [ ]} ${emptyFile}
|
2024-05-02 00:46:19 +00:00
|
|
|
touch $out
|
|
|
|
''
|