Created
July 27, 2024 15:06
-
-
Save Creativty/549498957760b9d3b262ad5780e4908d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set +xe | |
test_cases=',1 3 5 4 6 "3 2" 7,8 1h 3,96 966 9666 99999999999999999999999999999999' | |
IFS=','; for test_case in ${test_cases[@]} | |
do | |
actual="$(timeout 1 ./push_swap $test_case 2>&1)" | |
expected="$(timeout 1 ./checker_OS $test_case 2>&1)" | |
if [[ $actual != $expected ]] | |
then | |
echo failure: $test_case has different responses: \' $actual \' vs \' $expected \' | |
else | |
echo success: $test_case | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment