core/pkgs/build-support/trivial-builders/test/concat-test.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
380 B
Nix
Raw Normal View History

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