test-readable-identical.sh (636B)
1 hash=$(sha256sum tests/resources/example.txt) 2 ./build/debugEncode.out tests/resources/example.txt tests/artifacts/example.pbm 1920 1080 3 4 mv tests/resources/example.txt tests/resources/example.bak 5 6 ./build/debugDecode.out tests/artifacts/example0.pbm 7 res_hash=$(sha256sum tests/resources/example.txt) 8 9 mv tests/resources/example.txt tests/resources/copy.txt 10 mv tests/resources/example.bak tests/resources/example.txt 11 12 echo $res_hash 13 echo $hash 14 15 if [[ "$res_hash" == "$hash" ]]; then 16 echo 17 echo "Hashes match" 18 else 19 echo 20 echo "Hashes do not match!!!!" 21 echo "res_hash: $res_hash" 22 echo "hash: $hash" 23 exit 1 24 fi