Skip to content

Commit

Permalink
Enable --error-on-warnings in test-suite
Browse files Browse the repository at this point in the history
  • Loading branch information
m-o-e committed Jun 12, 2020
1 parent 6c6b1fd commit 1d178ee
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
.
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1d178ee

Please sign in to comment.