chore: fix test on non-Windows

This commit is contained in:
tydeu 2023-06-08 05:44:03 -04:00
parent 13d5e6f542
commit 462d306184
2 changed files with 11 additions and 6 deletions

View file

@ -4,4 +4,4 @@
# compile args
[1/2] Compiling foo
# link args
[2/2] Linking foo.exe
[2/2] Linking foo

View file

@ -7,19 +7,24 @@ cd foo
${LAKE} build
echo "# issue 50" | tee ../produced.out
${LAKE} build -KleanArgs=-DwarningAsError=true |& tee -a ../produced.out
${LAKE} build -KleanArgs=-DwarningAsError=true | tee -a ../produced.out
${LAKE} build
echo "# issue 172" | tee -a ../produced.out
${LAKE} build -KweakLeanArgs=-DwarningAsError=true |& tee -a ../produced.out
${LAKE} build -KweakLeanArgs=-DwarningAsError=true | tee -a ../produced.out
${LAKE} build
echo "# compile args" | tee -a ../produced.out
${LAKE} build -KleancArgs=-DBAR |& tee -a ../produced.out
${LAKE} build -KleancArgs=-DBAR | tee -a ../produced.out
${LAKE} build
echo "# link args" | tee -a ../produced.out
${LAKE} build -KlinkArgs=-Lbuild/lib |& tee -a ../produced.out
${LAKE} build -KlinkArgs=-Lbuild/lib | tee -a ../produced.out
# test
diff --strip-trailing-cr ../expected.out ../produced.out
if [ "$OS" = Windows_NT ]; then
sed -i 's/.exe//g' ../produced.out
diff --strip-trailing-cr ../expected.out ../produced.out
else
diff ../expected.out ../produced.out
fi