diff --git a/test/asm/undefined-builtins.asm b/test/asm/undefined-builtins.asm index fc40cacb..6a0ca6a4 100644 --- a/test/asm/undefined-builtins.asm +++ b/test/asm/undefined-builtins.asm @@ -3,6 +3,11 @@ assert !DEF(@) println @ println "{@}?" +; not inside a section +assert !DEF(__SCOPE__) +println __SCOPE__ +println "{__SCOPE__}?" + ; not inside a global scope assert !DEF(.) println . @@ -23,6 +28,10 @@ assert DEF(@) println @ println "{@}!" +assert DEF(__SCOPE__) +println __SCOPE__ +println "{__SCOPE__}!" + GlobalScope: assert DEF(.) println . diff --git a/test/asm/undefined-builtins.err b/test/asm/undefined-builtins.err index f6f7e02b..d266d8b3 100644 --- a/test/asm/undefined-builtins.err +++ b/test/asm/undefined-builtins.err @@ -2,16 +2,20 @@ error: PC has no value outside of a section at undefined-builtins.asm(3) error: Interpolated symbol `@` does not exist at undefined-builtins.asm(4) -error: `.` has no value outside of a label scope +error: `__SCOPE__` has no value outside of a section at undefined-builtins.asm(8) -error: Interpolated symbol `.` does not exist +error: Interpolated symbol `__SCOPE__` does not exist at undefined-builtins.asm(9) -error: `..` has no value outside of a local label scope +error: `.` has no value outside of a label scope at undefined-builtins.asm(13) -error: Interpolated symbol `..` does not exist +error: Interpolated symbol `.` does not exist at undefined-builtins.asm(14) -error: `_NARG` has no value outside of a macro +error: `..` has no value outside of a local label scope at undefined-builtins.asm(18) -error: Interpolated symbol `_NARG` does not exist +error: Interpolated symbol `..` does not exist at undefined-builtins.asm(19) -Assembly aborted with 8 errors! +error: `_NARG` has no value outside of a macro + at undefined-builtins.asm(23) +error: Interpolated symbol `_NARG` does not exist + at undefined-builtins.asm(24) +Assembly aborted with 10 errors! diff --git a/test/asm/undefined-builtins.out b/test/asm/undefined-builtins.out index 417e1179..3a60f0df 100644 --- a/test/asm/undefined-builtins.out +++ b/test/asm/undefined-builtins.out @@ -3,11 +3,15 @@ $0 ? +? + ? $0 ? $42 $42! + +! $42 GlobalScope! $42