bandwhich: 0.23.0 -> 0.23.1; move to by-name; nixfmt; useFetchCargoVendor (#356934)
[NixPkgs.git] / pkgs / build-support / setup-hooks / patch-rc-path-hooks / test / test-sourcing-csh
blob7ddb2ddc1bdc916ebb2ca1674b7a0185bb0cb290
1 #/usr/bin/env tcsh
3 set UNPATCHED_SOURCE_FILE = "$1"
4 set PATCHED_SOURCE_FILE = "$2"
5 set ORIG_PATH = "${PWD}/alfa:${PWD}/bravo"
7 set RESULT_PATH_FROM_UNPATCHED = `setenv PATH "$ORIG_PATH"; source $UNPATCHED_SOURCE_FILE; echo $PATH`
8 set RESULT_PATH_FROM_PATCHED = `setenv PATH "$ORIG_PATH"; source $PATCHED_SOURCE_FILE; echo $PATH`
10 if ($RESULT_PATH_FROM_UNPATCHED != $RESULT_PATH_FROM_PATCHED) then
11     echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" > /dev/stderr
12     exit 1
13 endif