aboutsummaryrefslogtreecommitdiff
path: root/scripts/test-e2e.sh
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-22 21:46:03 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-22 21:56:45 +0100
commit4a7e8db884fdaa80f6a026ec4c0c8409ea975d81 (patch)
treed7d23256b75e9cfa20390c888212841fbd4e32c5 /scripts/test-e2e.sh
parent179a68792e980a1d12bd67d57e593aab9f27ca30 (diff)
downloadtools.nes-4a7e8db884fdaa80f6a026ec4c0c8409ea975d81.tar.gz
tools.nes-4a7e8db884fdaa80f6a026ec4c0c8409ea975d81.zip
nasm: Implement the -D flag
This allows users to define variables directly from the command line, which is useful for testing purposes. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'scripts/test-e2e.sh')
-rwxr-xr-xscripts/test-e2e.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/test-e2e.sh b/scripts/test-e2e.sh
index 9ac7d04..2185768 100755
--- a/scripts/test-e2e.sh
+++ b/scripts/test-e2e.sh
@@ -15,6 +15,17 @@ popd
cargo build
+# Custom
+
+./target/debug/nasm -c empty -Werror -o tests/out/defines-undefined.nes tests/defines.s
+diff tests/out/defines-undefined.nes tests/expected/defines-undefined.nes
+
+./target/debug/nasm -D LALA -c empty -Werror -o tests/out/defines-one.nes tests/defines.s
+diff tests/out/defines-one.nes tests/expected/defines-one.nes
+
+./target/debug/nasm -D LALA=2 -c empty -Werror -o tests/out/defines-two.nes tests/defines.s
+diff tests/out/defines-two.nes tests/expected/defines-two.nes
+
# code.nes
./target/debug/nasm -c nrom -Werror -o tests/out/sprite.nes tests/code.nes/basics/sprite.s