From 1d178ee9cea82ccd899d5c54526e9adb0bfa6c18 Mon Sep 17 00:00:00 2001 From: moe Date: Fri, 12 Jun 2020 02:09:50 +0200 Subject: [PATCH] Enable `--error-on-warnings` in test-suite --- test/test.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/test.sh b/test/test.sh index 5ea3a1f..9e5a505 100755 --- a/test/test.sh +++ b/test/test.sh @@ -30,6 +30,8 @@ trap 'err $LINENO' ERR unset RUCKSACK_MODE +BUILD_FLAGS=--error-on-warnings + crystal run test/test.cr >$to 2>$te . RUCKSACK_MODE=0 crystal run test/test.cr >$to 2>$te @@ -41,7 +43,7 @@ RUCKSACK_MODE=0 crystal run test/test.cr >$to 2>$te ### crystal build w/o rucksack attached -crystal build test/test.cr -o ${tb} +crystal build $BUILD_FLAGS test/test.cr -o ${tb} . RUCKSACK_MODE=0 $tb >$to 2>$te . @@ -63,7 +65,7 @@ RUCKSACK_MODE=2 $tb >$to 2>$te ### crystal build with phony padding #### case A: extra nulls before Knautschzone -crystal build test/test.cr -o ${tb} +crystal build $BUILD_FLAGS test/test.cr -o ${tb} head -c 17042 /dev/zero >>${tb} cat .rucksack >>$tb RUCKSACK_MODE=0 $tb >$to 2>$te @@ -75,7 +77,7 @@ RUCKSACK_MODE=2 $tb >$to 2>$te #### case B: duplicate padding -crystal build test/test.cr -o ${tb} +crystal build $BUILD_FLAGS test/test.cr -o ${tb} head -c 16397 /dev/zero >>${tb} cat .rucksack >>$tb RUCKSACK_MODE=0 $tb >$to 2>$te @@ -87,7 +89,7 @@ RUCKSACK_MODE=2 $tb >$to 2>$te #### case C: extra nulls and truncated header -crystal build test/test.cr -o ${tb} +crystal build $BUILD_FLAGS test/test.cr -o ${tb} head -c 16397 /dev/zero >>${tb} echo = >>${tb} cat .rucksack >>$tb @@ -100,7 +102,7 @@ RUCKSACK_MODE=2 $tb >$to 2>$te #### case D: extra nulls and longer truncated header -crystal build test/test.cr -o ${tb} +crystal build $BUILD_FLAGS test/test.cr -o ${tb} head -c 16397 /dev/zero >>${tb} echo ==RUCK >>${tb} cat .rucksack >>$tb