nixpkgs/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.

13 lines
352 B
Nix
Raw Normal View History

2022-01-04 22:14:50 +00:00
{ callPackage, lib, pkgs, runCommand, concatText, writeText, hello, emptyFile }:
2021-12-02 20:55:23 +00:00
let
2021-12-30 12:12:34 +00:00
stri = writeText "pathToTest";
txt1 = stri "abc";
txt2 = stri hello;
res = concatText "textToTest" [ txt1 txt2 ];
2021-12-02 20:55:23 +00:00
in
2021-12-30 12:12:34 +00:00
runCommand "test-concatPaths" { } ''
diff -U3 <(cat ${txt1} ${txt2}) ${res}
2022-01-04 22:14:50 +00:00
diff -U3 ${concatText "void" []} ${emptyFile}
2021-12-02 20:55:23 +00:00
touch $out
''