]> granicus.if.org Git - yasm/commitdiff
Add parsers/nasm automated tests.
authorPeter Johnson <peter@tortall.net>
Thu, 3 Oct 2002 19:23:44 +0000 (19:23 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 3 Oct 2002 19:23:44 +0000 (19:23 -0000)
svn path=/trunk/yasm/; revision=735

18 files changed:
modules/parsers/nasm/Makefile.inc
modules/parsers/nasm/tests/Makefile.inc [new file with mode: 0644]
modules/parsers/nasm/tests/equlocal.asm [new file with mode: 0644]
modules/parsers/nasm/tests/equlocal.errwarn [new file with mode: 0644]
modules/parsers/nasm/tests/equlocal.hex [new file with mode: 0644]
modules/parsers/nasm/tests/nasm_test.sh [new file with mode: 0755]
modules/parsers/nasm/tests/newsect.asm [new file with mode: 0644]
modules/parsers/nasm/tests/newsect.errwarn [new file with mode: 0644]
modules/parsers/nasm/tests/newsect.hex [new file with mode: 0644]
src/parsers/nasm/Makefile.inc
src/parsers/nasm/tests/Makefile.inc [new file with mode: 0644]
src/parsers/nasm/tests/equlocal.asm [new file with mode: 0644]
src/parsers/nasm/tests/equlocal.errwarn [new file with mode: 0644]
src/parsers/nasm/tests/equlocal.hex [new file with mode: 0644]
src/parsers/nasm/tests/nasm_test.sh [new file with mode: 0755]
src/parsers/nasm/tests/newsect.asm [new file with mode: 0644]
src/parsers/nasm/tests/newsect.errwarn [new file with mode: 0644]
src/parsers/nasm/tests/newsect.hex [new file with mode: 0644]

index 4df1553b3f471ed2397aede16411fe4862642119..ae8b405b37ee3716c24fd9788a64fd60edf688c3 100644 (file)
@@ -21,4 +21,7 @@ CLEANFILES += \
        nasm-token.c
 
 EXTRA_DIST += \
+       src/parsers/nasm/tests/Makefile.inc     \
        src/parsers/nasm/nasm-token.re
+
+include src/parsers/nasm/tests/Makefile.inc
diff --git a/modules/parsers/nasm/tests/Makefile.inc b/modules/parsers/nasm/tests/Makefile.inc
new file mode 100644 (file)
index 0000000..8b2af9e
--- /dev/null
@@ -0,0 +1,21 @@
+# $IdPath$
+
+TESTS += \
+       src/parsers/nasm/tests/nasm_test.sh
+
+EXTRA_DIST += \
+       src/parsers/nasm/tests/nasm_test.sh     \
+       src/parsers/nasm/tests/equlocal.asm     \
+       src/parsers/nasm/tests/equlocal.errwarn \
+       src/parsers/nasm/tests/equlocal.hex     \
+       src/parsers/nasm/tests/newsect.asm      \
+       src/parsers/nasm/tests/newsect.errwarn  \
+       src/parsers/nasm/tests/newsect.hex
+
+CLEANFILES += \
+       equlocal \
+       equlocal.ew \
+       equlocal.hx \
+       newsect \
+       newsect.ew \
+       newsect.hx
diff --git a/modules/parsers/nasm/tests/equlocal.asm b/modules/parsers/nasm/tests/equlocal.asm
new file mode 100644 (file)
index 0000000..ca54062
--- /dev/null
@@ -0,0 +1,7 @@
+blah
+.local equ 5
+blah2
+db blah.local
+.local
+nonlocal equ 6
+je .local
diff --git a/modules/parsers/nasm/tests/equlocal.errwarn b/modules/parsers/nasm/tests/equlocal.errwarn
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/parsers/nasm/tests/equlocal.hex b/modules/parsers/nasm/tests/equlocal.hex
new file mode 100644 (file)
index 0000000..0ee1d6e
--- /dev/null
@@ -0,0 +1,3 @@
+05 
+74 
+fe 
diff --git a/modules/parsers/nasm/tests/nasm_test.sh b/modules/parsers/nasm/tests/nasm_test.sh
new file mode 100755 (executable)
index 0000000..ad04150
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+# $IdPath$
+${srcdir}/out_test.sh nasm_test src/parsers/nasm/tests "nasm-compat parser" "-f bin" ""
+exit $?
diff --git a/modules/parsers/nasm/tests/newsect.asm b/modules/parsers/nasm/tests/newsect.asm
new file mode 100644 (file)
index 0000000..420e17c
--- /dev/null
@@ -0,0 +1,10 @@
+[absolute 0]
+mytype:
+.long resd 1
+mytype_size:
+[section .text]
+lbl:
+..@6.strucstart:
+times mytype.long-($-..@6.strucstart) db 0
+dd 'ABCD'
+times mytype_size-($-..@6.strucstart) db 0
diff --git a/modules/parsers/nasm/tests/newsect.errwarn b/modules/parsers/nasm/tests/newsect.errwarn
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/parsers/nasm/tests/newsect.hex b/modules/parsers/nasm/tests/newsect.hex
new file mode 100644 (file)
index 0000000..7b68ada
--- /dev/null
@@ -0,0 +1,4 @@
+41 
+42 
+43 
+44 
index 4df1553b3f471ed2397aede16411fe4862642119..ae8b405b37ee3716c24fd9788a64fd60edf688c3 100644 (file)
@@ -21,4 +21,7 @@ CLEANFILES += \
        nasm-token.c
 
 EXTRA_DIST += \
+       src/parsers/nasm/tests/Makefile.inc     \
        src/parsers/nasm/nasm-token.re
+
+include src/parsers/nasm/tests/Makefile.inc
diff --git a/src/parsers/nasm/tests/Makefile.inc b/src/parsers/nasm/tests/Makefile.inc
new file mode 100644 (file)
index 0000000..8b2af9e
--- /dev/null
@@ -0,0 +1,21 @@
+# $IdPath$
+
+TESTS += \
+       src/parsers/nasm/tests/nasm_test.sh
+
+EXTRA_DIST += \
+       src/parsers/nasm/tests/nasm_test.sh     \
+       src/parsers/nasm/tests/equlocal.asm     \
+       src/parsers/nasm/tests/equlocal.errwarn \
+       src/parsers/nasm/tests/equlocal.hex     \
+       src/parsers/nasm/tests/newsect.asm      \
+       src/parsers/nasm/tests/newsect.errwarn  \
+       src/parsers/nasm/tests/newsect.hex
+
+CLEANFILES += \
+       equlocal \
+       equlocal.ew \
+       equlocal.hx \
+       newsect \
+       newsect.ew \
+       newsect.hx
diff --git a/src/parsers/nasm/tests/equlocal.asm b/src/parsers/nasm/tests/equlocal.asm
new file mode 100644 (file)
index 0000000..ca54062
--- /dev/null
@@ -0,0 +1,7 @@
+blah
+.local equ 5
+blah2
+db blah.local
+.local
+nonlocal equ 6
+je .local
diff --git a/src/parsers/nasm/tests/equlocal.errwarn b/src/parsers/nasm/tests/equlocal.errwarn
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/parsers/nasm/tests/equlocal.hex b/src/parsers/nasm/tests/equlocal.hex
new file mode 100644 (file)
index 0000000..0ee1d6e
--- /dev/null
@@ -0,0 +1,3 @@
+05 
+74 
+fe 
diff --git a/src/parsers/nasm/tests/nasm_test.sh b/src/parsers/nasm/tests/nasm_test.sh
new file mode 100755 (executable)
index 0000000..ad04150
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+# $IdPath$
+${srcdir}/out_test.sh nasm_test src/parsers/nasm/tests "nasm-compat parser" "-f bin" ""
+exit $?
diff --git a/src/parsers/nasm/tests/newsect.asm b/src/parsers/nasm/tests/newsect.asm
new file mode 100644 (file)
index 0000000..420e17c
--- /dev/null
@@ -0,0 +1,10 @@
+[absolute 0]
+mytype:
+.long resd 1
+mytype_size:
+[section .text]
+lbl:
+..@6.strucstart:
+times mytype.long-($-..@6.strucstart) db 0
+dd 'ABCD'
+times mytype_size-($-..@6.strucstart) db 0
diff --git a/src/parsers/nasm/tests/newsect.errwarn b/src/parsers/nasm/tests/newsect.errwarn
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/parsers/nasm/tests/newsect.hex b/src/parsers/nasm/tests/newsect.hex
new file mode 100644 (file)
index 0000000..7b68ada
--- /dev/null
@@ -0,0 +1,4 @@
+41 
+42 
+43 
+44