python311Packages.moto: 4.2.6 -> 4.2.10
[NixPkgs.git] / pkgs / build-support / setup-hooks / patch-rc-path-hooks / test / test-sourcing-fish
blobfcce014331e5d2acf27fb105b308b8390b40888a
1 #/usr/bin/env fish
3 set UNPATCHED_SOURCE_FILE $argv[1]
4 set PATCHED_SOURCE_FILE $argv[2]
5 set ORIG_PATH "$PWD/alfa:$PWD/bravo"
7 set RESULT_PATH_FROM_UNPATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $UNPATCHED_SOURCE_FILE; echo \"\$PATH\"")
8 set RESULT_PATH_FROM_PATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $PATCHED_SOURCE_FILE; echo \"\$PATH\"")
10 if test "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED"
11     echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" >&2
12     exit 1
13 end