aboutsummaryrefslogtreecommitdiff
path: root/scripts/test-e2e.sh
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-08-18 16:39:37 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-08-18 16:39:37 +0200
commitfcd4c9a267b407e653ed6b21ae87f219f3e4c4af (patch)
tree0b5f3e9bf99ab7377fa0bb6d204661ac8fbe3380 /scripts/test-e2e.sh
parentd479b0fbd3778f5b6fc8b63f46aa0c5364e4fe7e (diff)
downloadtools.nes-fcd4c9a267b407e653ed6b21ae87f219f3e4c4af.tar.gz
tools.nes-fcd4c9a267b407e653ed6b21ae87f219f3e4c4af.zip
Add global labels
These are labels that are declared by prefixing a '#' symbol to the name, and it allows the label to be declared at the global scope instead of the current one. This is a feature which is not to be abused so to not make scopes pointless, but it can be quite handy with some optimizations while not abandoning scopes completely. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'scripts/test-e2e.sh')
-rwxr-xr-xscripts/test-e2e.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/test-e2e.sh b/scripts/test-e2e.sh
index 0620f25..6e18644 100755
--- a/scripts/test-e2e.sh
+++ b/scripts/test-e2e.sh
@@ -140,6 +140,13 @@ exit_code=$((exit_code + $?))
diff tests/out/fixed-segments.nes tests/expected/fixed-segments.nes
exit_code=$((exit_code + $?))
+echo "test: custom => global-labels.nes"
+./target/debug/nasm -c empty -Werror --asan -o tests/out/global-labels.nes tests/global-labels.s 2>tests/out/global-labels.txt
+diff tests/out/global-labels.txt tests/expected/global-labels.txt
+exit_code=$((exit_code + $?))
+diff tests/out/global-labels.nes tests/expected/global-labels.nes
+exit_code=$((exit_code + $?))
+
##
# code.nes