From 0cbb3df7f46f6d9b93f1fdfcaea203d6cc766d55 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Sun, 4 Nov 2018 16:50:19 +0300 Subject: [PATCH] test: nasm-t -- Add org test Signed-off-by: Cyrill Gorcunov --- travis/test/org.asm | 15 +++++++++++++++ travis/test/org.json | 18 ++++++++++++++++++ travis/test/org.stderr | 1 + 3 files changed, 34 insertions(+) create mode 100644 travis/test/org.asm create mode 100644 travis/test/org.json create mode 100644 travis/test/org.stderr diff --git a/travis/test/org.asm b/travis/test/org.asm new file mode 100644 index 000000000..6f1fa81a1 --- /dev/null +++ b/travis/test/org.asm @@ -0,0 +1,15 @@ +; +; Simple test of a 64-bit org directive +; + bits 64 + org 0xffffffffffff0000 + +hello: jmp there + nop + nop +there: + add rax,[rsp+rbx] + inc eax + + section .data +there_ptr dq there diff --git a/travis/test/org.json b/travis/test/org.json new file mode 100644 index 000000000..aa19a41de --- /dev/null +++ b/travis/test/org.json @@ -0,0 +1,18 @@ +[ + { + "description": "Test org directive error (elf64)", + "id": "org", + "format": "elf64", + "source": "org.asm", + "option": "-Ox", + "target": [ + { "stderr": "org.stderr" } + ], + "error": "expected" + }, + { + "description": "Test org directive error (win64)", + "ref": "org", + "format": "win64" + } +] diff --git a/travis/test/org.stderr b/travis/test/org.stderr new file mode 100644 index 000000000..431c1fddc --- /dev/null +++ b/travis/test/org.stderr @@ -0,0 +1 @@ +./travis/test/org.asm:5: error: parser: instruction expected \ No newline at end of file