pokecarde/tests/scripts/stripgbc/pass.sh
FexCollects 128dc8fc12
test: Add basic tests and CI infrastructure (#4)
* Add basic test for stripgbc script

* Add ci

* fix invalid workflow

* fix dir issue

* force fail

* unfail and only pr
2024-12-29 12:57:08 -07:00

20 lines
432 B
Bash
Executable File

set -ex
# Cleanup test files
function cleanup {
rm -f input.bin output.bin output.golden.bin
}
trap cleanup EXIT
# Convert the input hex into binary
xxd -r input.hex > input.bin
# Convert the expected output into binary
xxd -r output.gold.hex > output.golden.bin
# Run the script to create the output
python3 ../../../scripts/stripgbc.py input.bin output.bin
# Verify the output matches
diff output.bin output.golden.bin