From 8b38c88ae55a6edf1028a5aa57b93afdbc4001d6 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 3 Feb 2026 10:49:33 +0100 Subject: Avoid invalid identifiers in proc/macro/scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was apparently neglected and you were able to pick invalid identifiers to identify procs, macros and scopes. Ensure this does not happen again and provide tests for it. Signed-off-by: Miquel Sabaté Solà --- scripts/test-e2e.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts/test-e2e.sh') diff --git a/scripts/test-e2e.sh b/scripts/test-e2e.sh index 18dbeff..06545b8 100755 --- a/scripts/test-e2e.sh +++ b/scripts/test-e2e.sh @@ -88,6 +88,13 @@ exit_code=$((exit_code + $?)) diff tests/out/fallthrough.nes tests/expected/fallthrough.nes exit_code=$((exit_code + $?)) +echo "test: custom => avoid_bad_macro.nes" +./target/debug/nasm -c empty --asan tests/avoid_bad_macro.s -o tests/out/avoid_bad_macro.nes 2>tests/out/avoid_bad_macro.txt +diff tests/out/avoid_bad_macro.txt tests/expected/avoid_bad_macro.txt +exit_code=$((exit_code + $?)) +diff tests/out/avoid_bad_macro.nes tests/expected/avoid_bad_macro.nes +exit_code=$((exit_code + $?)) + ## # code.nes -- cgit v1.2.3