From 4a7e8db884fdaa80f6a026ec4c0c8409ea975d81 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 22 Jan 2025 21:46:03 +0100 Subject: nasm: Implement the -D flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows users to define variables directly from the command line, which is useful for testing purposes. Signed-off-by: Miquel Sabaté Solà --- scripts/test-e2e.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'scripts') 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 -- cgit v1.2.3