mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-30 06:47:48 +00:00
@@ -3,5 +3,5 @@ ERROR: anon-label-bad.asm(2):
|
||||
ERROR: anon-label-bad.asm(6):
|
||||
Reference to anonymous label 2 before, when only 1 has been created so far
|
||||
ERROR: anon-label-bad.asm(18):
|
||||
syntax error
|
||||
syntax error, unexpected ':'
|
||||
error: Assembly aborted (3 errors)!
|
||||
|
||||
7
test/asm/anon-label-bad.simple.err
Normal file
7
test/asm/anon-label-bad.simple.err
Normal file
@@ -0,0 +1,7 @@
|
||||
ERROR: anon-label-bad.asm(2):
|
||||
Label "!0" created outside of a SECTION
|
||||
ERROR: anon-label-bad.asm(6):
|
||||
Reference to anonymous label 2 before, when only 1 has been created so far
|
||||
ERROR: anon-label-bad.asm(18):
|
||||
syntax error
|
||||
error: Assembly aborted (3 errors)!
|
||||
@@ -1,5 +1,5 @@
|
||||
ERROR: block-comment-termination-error.asm(1):
|
||||
Unterminated block comment
|
||||
ERROR: block-comment-termination-error.asm(1):
|
||||
syntax error
|
||||
syntax error, unexpected newline
|
||||
error: Assembly aborted (2 errors)!
|
||||
|
||||
5
test/asm/block-comment-termination-error.simple.err
Normal file
5
test/asm/block-comment-termination-error.simple.err
Normal file
@@ -0,0 +1,5 @@
|
||||
ERROR: block-comment-termination-error.asm(1):
|
||||
Unterminated block comment
|
||||
ERROR: block-comment-termination-error.asm(1):
|
||||
syntax error
|
||||
error: Assembly aborted (2 errors)!
|
||||
@@ -1,7 +1,4 @@
|
||||
ERROR: label-macro-arg.asm(38) -> label-macro-arg.asm::test_char(25):
|
||||
Local label 'sizeof_.something' in main scope
|
||||
syntax error, unexpected '='
|
||||
while expanding symbol "VAR_DEF"
|
||||
ERROR: label-macro-arg.asm(38) -> label-macro-arg.asm::test_char(25):
|
||||
syntax error
|
||||
while expanding symbol "VAR_DEF"
|
||||
error: Assembly aborted (2 errors)!
|
||||
error: Assembly aborted (1 errors)!
|
||||
|
||||
7
test/asm/label-macro-arg.simple.err
Normal file
7
test/asm/label-macro-arg.simple.err
Normal file
@@ -0,0 +1,7 @@
|
||||
ERROR: label-macro-arg.asm(38) -> label-macro-arg.asm::test_char(25):
|
||||
Local label 'sizeof_.something' in main scope
|
||||
while expanding symbol "VAR_DEF"
|
||||
ERROR: label-macro-arg.asm(38) -> label-macro-arg.asm::test_char(25):
|
||||
syntax error
|
||||
while expanding symbol "VAR_DEF"
|
||||
error: Assembly aborted (2 errors)!
|
||||
2
test/asm/syntax-error.asm
Normal file
2
test/asm/syntax-error.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
; The reported error here depends on Bison's parse.error flag.
|
||||
print a
|
||||
3
test/asm/syntax-error.err
Normal file
3
test/asm/syntax-error.err
Normal file
@@ -0,0 +1,3 @@
|
||||
ERROR: syntax-error.asm(2):
|
||||
syntax error, unexpected 'a'
|
||||
error: Assembly aborted (1 errors)!
|
||||
0
test/asm/syntax-error.out
Normal file
0
test/asm/syntax-error.out
Normal file
3
test/asm/syntax-error.simple.err
Normal file
3
test/asm/syntax-error.simple.err
Normal file
@@ -0,0 +1,3 @@
|
||||
ERROR: syntax-error.asm(2):
|
||||
syntax error
|
||||
error: Assembly aborted (1 errors)!
|
||||
@@ -47,13 +47,26 @@ warning: quote"file.asm(1): [-Wuser]
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Check whether to use '.simple.err' files if they exist
|
||||
# (rgbasm with pre-3.0 Bison just reports "syntax error")
|
||||
../../rgbasm -Weverything -o $o syntax-error.asm > $output 2> $errput
|
||||
cmp syntax-error.err $errput > /dev/null 2> /dev/null
|
||||
simple_error=$?
|
||||
if [ "$simple_error" -eq 1 ]; then
|
||||
echo "${bold}${orange}Warning: using .simple.err files when available.${rescolors}${resbold}"
|
||||
fi
|
||||
|
||||
for i in *.asm; do
|
||||
for variant in '' '.pipe'; do
|
||||
echo "${bold}${green}${i%.asm}${variant}...${rescolors}${resbold}"
|
||||
desired_errname=${i%.asm}.err
|
||||
if [ "$simple_error" -eq 1 ] && [ -e ${i%.asm}.simple.err ]; then
|
||||
desired_errname=${i%.asm}.simple.err
|
||||
fi
|
||||
if [ -z "$variant" ]; then
|
||||
../../rgbasm -Weverything -o $o $i > $output 2> $errput
|
||||
desired_output=${i%.asm}.out
|
||||
desired_errput=${i%.asm}.err
|
||||
desired_errput=$desired_errname
|
||||
else
|
||||
# `include-recursion.asm` refers to its own name inside the test code.
|
||||
# Skip testing with stdin input for that file.
|
||||
@@ -74,7 +87,7 @@ for i in *.asm; do
|
||||
subst="$(printf '%s\n' "$i" | sed 's:[][\/.^$*]:\\&:g')"
|
||||
# Replace the file name with a dash to match changed output
|
||||
sed "s/$subst/<stdin>/g" ${i%.asm}.out > $desired_output
|
||||
sed "s/$subst/<stdin>/g" ${i%.asm}.err > $desired_errput
|
||||
sed "s/$subst/<stdin>/g" $desired_errname > $desired_errput
|
||||
fi
|
||||
|
||||
tryDiff $desired_output $output out
|
||||
|
||||
Reference in New Issue
Block a user