test-stratified.sh (700B)
1 2 hash=$(sha256sum tests/resources/stratified.txt) 3 4 mkdir tests/artifacts/strat 5 6 ./build/debugEncode.out tests/resources/stratified.txt tests/artifacts/strat/strat.out 100 100 7 8 mv tests/resources/stratified.txt tests/resources/stratified.bak 9 10 ./build/debugDecode.out -d tests/artifacts/strat 11 12 res_hash=$(sha256sum tests/resources/stratified.txt) 13 14 mv tests/resources/stratified.txt tests/resources/cp_stratified.txt 15 mv tests/resources/stratified.bak tests/resources/stratified.txt 16 17 18 echo $res_hash 19 echo $hash 20 21 if [[ "$res_hash" == "$hash" ]]; then 22 echo 23 echo "Hashes match" 24 else 25 echo 26 echo "Hashes do not match!!!!" 27 echo "res_hash: $res_hash" 28 echo "hash: $hash" 29 exit 1 30 fi