mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-21 10:13:04 +00:00
More tests. Refine string delimiter test for .ASCII a bit.
Make the delimiters for .INCLUDE and .LIBRARY accept the same delimiters (= is not disallowed, it just makes the line look like an assignment).
This commit is contained in:
parent
fdceabe88c
commit
137a9db671
4
parse.c
4
parse.c
@ -83,6 +83,9 @@ char *getstring(
|
||||
* but not
|
||||
* .include ^/name/ <name> name =name= :name:
|
||||
* .include :name: seems to be silently ignored.
|
||||
*
|
||||
* This should probably follow the exact same rules as .ASCII
|
||||
* although that is not mentioned in the manual,
|
||||
*/
|
||||
char *getstring_fn(
|
||||
char *cp,
|
||||
@ -94,7 +97,6 @@ char *getstring_fn(
|
||||
|
||||
switch (*cp) {
|
||||
case '<':
|
||||
case '=':
|
||||
case ':':
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ TESTS="test-asciz \
|
||||
test-jmp \
|
||||
test-locals \
|
||||
test-macro-comma \
|
||||
test-psect \
|
||||
test-undef \
|
||||
test-word-comma"
|
||||
|
||||
|
||||
@ -6,7 +6,15 @@ CR = 13.
|
||||
LF = 10.
|
||||
SOH = 1
|
||||
|
||||
.asciz <cr><lf>/<SOH>/ ; 2 bytes and a string
|
||||
.asciz /<cr><lf><SOH>/ ; only a string
|
||||
.asciz |<cr><lf><SOH>| ; the same string
|
||||
.asciz <cr><lf><SOH> ; 3 bytes
|
||||
.asciz <cr><lf>/<SOH>/ ; 2 bytes and a string
|
||||
.asciz /<cr><lf><SOH>/ ; only a string
|
||||
.asciz |<cr><lf><SOH>| ; the same string
|
||||
.ascii <cr><lf><SOH> ; 3 bytes
|
||||
|
||||
.asciz ;ABC;/DEF/ ; ABCDEF, not recommended practice
|
||||
.asciz /ABC/;DEF; ; ABC, not recommended practice
|
||||
.asciz /ABC/=DEF= ; ABCDEF, not recommended practice
|
||||
.asciz =DEF= ; syntax error: assignment
|
||||
.asciz =###= ; syntax error: assignment
|
||||
.asciz :SOH: ; syntax error: colon not allowed
|
||||
.asciz :###: ; syntax error: colon not allowed
|
||||
|
||||
@ -13,5 +13,5 @@
|
||||
|
||||
.include <incl.mac>
|
||||
.include <incl.mac<
|
||||
.include =incl.mac=
|
||||
.include :incl.mac:
|
||||
.include =incl.mac= ; looks like assignment
|
||||
.include :incl.mac: ; looks like a label
|
||||
|
||||
12
tests/test-psect.mac
Normal file
12
tests/test-psect.mac
Normal file
@ -0,0 +1,12 @@
|
||||
;;;;;
|
||||
;
|
||||
; Contrary to what the manual says, flags in .PSECT directives
|
||||
; are merged. They do not need to be identical every time.
|
||||
;
|
||||
|
||||
.psect $pdata
|
||||
.iif P1, .psect $pdata ,ro,d,lcl,rel,con
|
||||
.psect $PDATA ,D
|
||||
|
||||
; and ends up with
|
||||
; $PDATA 000000 002 (RO,D,LCL,REL,CON)
|
||||
Loading…
x
Reference in New Issue
Block a user