biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / build-support / trivial-builders / test / write-shell-script.nix
bloba5c9f1fae42f6f15c71b1497366f7c683f7212db
1 { lib, writeShellScript }: let
2   output = "hello";
3 in (writeShellScript "test-script" ''
4   echo ${lib.escapeShellArg output}
5 '').overrideAttrs (old: {
6   checkPhase = old.checkPhase or "" + ''
7     expected=${lib.escapeShellArg output}
8     got=$("$target")
9     if [[ "$got" != "$expected" ]]; then
10       echo "wrong output: expected $expected, got $got"
11       exit 1
12     fi
13   '';