aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2022-10-25 09:04:14 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2022-10-25 18:09:36 +0300
commit725f77650d4376a27307de7dd27d4bc393a74946 (patch)
treebecd55d1c71a082f1e5f6036190707e1a364beb4 /test cases
parentd67c4c6ab015ec4fd442f01431175deb74d8b158 (diff)
downloadmeson-725f77650d4376a27307de7dd27d4bc393a74946.zip
meson-725f77650d4376a27307de7dd27d4bc393a74946.tar.gz
meson-725f77650d4376a27307de7dd27d4bc393a74946.tar.bz2
tests: Add nasm compiler checks
Diffstat (limited to 'test cases')
-rw-r--r--test cases/nasm/2 asm language/meson.build18
1 files changed, 18 insertions, 0 deletions
diff --git a/test cases/nasm/2 asm language/meson.build b/test cases/nasm/2 asm language/meson.build
index f6fbff8..21787ff 100644
--- a/test cases/nasm/2 asm language/meson.build
+++ b/test cases/nasm/2 asm language/meson.build
@@ -11,6 +11,24 @@ if not add_languages('nasm', required: false)
error('MESON_SKIP_TEST: nasm not found')
endif
+nasm = meson.get_compiler('nasm')
+
+code = '''
+SECTION .text
+global main
+main:
+ mov foo,bar ; error: symbol `foo' not defined
+'''
+assert(not nasm.compiles(code, name: 'Invalid NASM code'))
+
+code = '''
+SECTION .text
+global main
+main:
+ mov eax,1
+'''
+assert(nasm.compiles(code, name: 'Valid NASM code'))
+
config_file = configure_file(
output: 'config.asm',
configuration: {'HELLO': 0},