about summary refs log tree commit diff
path: root/nixpkgs/pkgs/build-support/trivial-builders/test/concat-test.nix
blob: 5ce43561906913e2b3a920bb0549dc494f027568 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
{ 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
''