diff --git a/test-decode-gci.sh b/test-decode-gci.sh index 16ca7035..41d5c4c8 100755 --- a/test-decode-gci.sh +++ b/test-decode-gci.sh @@ -7,30 +7,30 @@ if [ "$EXECUTABLE" == "" ]; then EXECUTABLE="./newserv" fi -echo "... decode GCIEpisode3.gci" -$EXECUTABLE decode-gci tests/GCIEpisode3.gci -diff tests/GCIEpisode3.dec tests/GCIEpisode3.gci.dec -echo "... decode GCIWithoutEncryption.gci" -$EXECUTABLE decode-gci tests/GCIWithoutEncryption.gci -diff tests/GCIWithoutEncryption.dec tests/GCIWithoutEncryption.gci.dec -echo "... decode GCIWithEmbeddedKey.gci" -$EXECUTABLE decode-gci tests/GCIWithEmbeddedKey.gci -diff tests/GCIWithEmbeddedKey.dec tests/GCIWithEmbeddedKey.gci.dec -echo "... decode GCIWithoutEmbeddedKey.gci" -$EXECUTABLE decode-gci tests/GCIWithoutEmbeddedKey.gci --seed=1705B11E -diff tests/GCIWithoutEmbeddedKey.dec tests/GCIWithoutEmbeddedKey.gci.dec +echo "... decode gci/quest-ep3.gci" +$EXECUTABLE decode-gci tests/gci/quest-ep3.gci +diff tests/gci/quest-ep3.dec tests/gci/quest-ep3.gci.dec +echo "... decode gci/quest-unencrypted.gci" +$EXECUTABLE decode-gci tests/gci/quest-unencrypted.gci +diff tests/gci/quest-unencrypted.dec tests/gci/quest-unencrypted.gci.dec +echo "... decode gci/quest-with-key.gci" +$EXECUTABLE decode-gci tests/gci/quest-with-key.gci +diff tests/gci/quest-with-key.dec tests/gci/quest-with-key.gci.dec +echo "... decode gci/quest-without-key.gci" +$EXECUTABLE decode-gci tests/gci/quest-without-key.gci --seed=1705B11E +diff tests/gci/quest-without-key.dec tests/gci/quest-without-key.gci.dec -echo "... re-encrypt GCICharFile.gci" -./newserv encrypt-gci-save --sys=tests/GCISystemFile.gci tests/GCICharFile.gcid tests/GCICharFile.gci -./newserv decrypt-gci-save --sys=tests/GCISystemFile.gci tests/GCICharFile.gci tests/GCICharFile-redec.gcid -hexdump -vC tests/GCICharFile.gcid > tests/GCICharFile.gcid.hex -hexdump -vC tests/GCICharFile-redec.gcid > tests/GCICharFile-redec.gcid.hex +echo "... re-encrypt gci/save-charfile.gci" +./newserv encrypt-gci-save --sys=tests/gci/save-system.gci tests/gci/save-charfile.gcid tests/gci/save-charfile.gci +./newserv decrypt-gci-save --sys=tests/gci/save-system.gci tests/gci/save-charfile.gci tests/gci/save-charfile-redec.gcid +hexdump -vC tests/gci/save-charfile.gcid > tests/gci/save-charfile.gcid.hex +hexdump -vC tests/gci/save-charfile-redec.gcid > tests/gci/save-charfile-redec.gcid.hex # There should be differences on two lines: the checksum and the round2 seed -NUM_DIFF_LINES=$(diff -y --suppress-common-lines tests/GCICharFile.gcid.hex tests/GCICharFile-redec.gcid.hex | wc -l) +NUM_DIFF_LINES=$(diff -y --suppress-common-lines tests/gci/save-charfile.gcid.hex tests/gci/save-charfile-redec.gcid.hex | wc -l) if [[ $NUM_DIFF_LINES -ne 2 ]]; then - diff -U3 tests/GCICharFile.gcid.hex tests/GCICharFile-redec.gcid.hex + diff -U3 tests/gci/save-charfile.gcid.hex tests/gci/save-charfile-redec.gcid.hex exit 1 fi echo "... clean up" -rm tests/*.gci.dec tests/GCICharFile.gci tests/GCICharFile-redec.gcid tests/*.hex +rm tests/gci/*.gci.dec tests/gci/save-charfile.gci tests/gci/save-charfile-redec.gcid tests/gci/*.hex diff --git a/test-decode-vms.sh b/test-decode-vms.sh index b371abbe..2b95891b 100755 --- a/test-decode-vms.sh +++ b/test-decode-vms.sh @@ -7,12 +7,12 @@ if [ "$EXECUTABLE" == "" ]; then EXECUTABLE="./newserv" fi -echo "... decode LionelV1.vms" -$EXECUTABLE decode-vms tests/LionelV1.vms -diff tests/LionelV1.dec tests/LionelV1.vms.dec -echo "... decode LionelV2.vms" -$EXECUTABLE decode-vms tests/LionelV2.vms --seed=D0231610 -diff tests/LionelV2.dec tests/LionelV2.vms.dec +echo "... decode vms/lionel-v1.vms" +$EXECUTABLE decode-vms tests/vms/lionel-v1.vms +diff tests/vms/lionel-v1.dec tests/vms/lionel-v1.vms.dec +echo "... decode vms/lionel-v2.vms" +$EXECUTABLE decode-vms tests/vms/lionel-v2.vms --seed=D0231610 +diff tests/vms/lionel-v2.dec tests/vms/lionel-v2.vms.dec echo "... clean up" -rm tests/*.vms.dec +rm tests/vms/*.vms.dec diff --git a/tests/GCIEpisode3.dec b/tests/gci/quest-ep3.dec similarity index 100% rename from tests/GCIEpisode3.dec rename to tests/gci/quest-ep3.dec diff --git a/tests/GCIEpisode3.gci b/tests/gci/quest-ep3.gci similarity index 100% rename from tests/GCIEpisode3.gci rename to tests/gci/quest-ep3.gci diff --git a/tests/GCIWithoutEncryption.dec b/tests/gci/quest-unencrypted.dec similarity index 100% rename from tests/GCIWithoutEncryption.dec rename to tests/gci/quest-unencrypted.dec diff --git a/tests/GCIWIthoutEncryption.gci b/tests/gci/quest-unencrypted.gci similarity index 100% rename from tests/GCIWIthoutEncryption.gci rename to tests/gci/quest-unencrypted.gci diff --git a/tests/GCIWithEmbeddedKey.dec b/tests/gci/quest-with-key.dec similarity index 100% rename from tests/GCIWithEmbeddedKey.dec rename to tests/gci/quest-with-key.dec diff --git a/tests/GCIWithEmbeddedKey.gci b/tests/gci/quest-with-key.gci similarity index 100% rename from tests/GCIWithEmbeddedKey.gci rename to tests/gci/quest-with-key.gci diff --git a/tests/GCIWithoutEmbeddedKey.dec b/tests/gci/quest-without-key.dec similarity index 100% rename from tests/GCIWithoutEmbeddedKey.dec rename to tests/gci/quest-without-key.dec diff --git a/tests/GCIWithoutEmbeddedKey.gci b/tests/gci/quest-without-key.gci similarity index 100% rename from tests/GCIWithoutEmbeddedKey.gci rename to tests/gci/quest-without-key.gci diff --git a/tests/GCICharFile.gcid b/tests/gci/save-charfile.gcid similarity index 100% rename from tests/GCICharFile.gcid rename to tests/gci/save-charfile.gcid diff --git a/tests/GCISystemFile.gci b/tests/gci/save-system.gci similarity index 100% rename from tests/GCISystemFile.gci rename to tests/gci/save-system.gci diff --git a/tests/LionelV1.dec b/tests/vms/lionel-v1.dec similarity index 100% rename from tests/LionelV1.dec rename to tests/vms/lionel-v1.dec diff --git a/tests/LionelV1.vms b/tests/vms/lionel-v1.vms similarity index 100% rename from tests/LionelV1.vms rename to tests/vms/lionel-v1.vms diff --git a/tests/LionelV2.dec b/tests/vms/lionel-v2.dec similarity index 100% rename from tests/LionelV2.dec rename to tests/vms/lionel-v2.dec diff --git a/tests/LionelV2.vms b/tests/vms/lionel-v2.vms similarity index 100% rename from tests/LionelV2.vms rename to tests/vms/lionel-v2.vms