aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2020-10-10 14:16:35 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2020-10-10 14:21:34 +0300
commit52f82633d37a2da9bc0631134d93d01d296fa4fc (patch)
tree7414c4d126f1b60a95eef8f597cf74eecb57dd81
parentb07ef092735af7f86cc3c5b9cda6980b62e8ad55 (diff)
downloadnasm-52f82633d37a2da9bc0631134d93d01d296fa4fc.tar.gz
nasm-52f82633d37a2da9bc0631134d93d01d296fa4fc.tar.xz
nasm-52f82633d37a2da9bc0631134d93d01d296fa4fc.zip
travis: add strlen
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--travis/test/strlen.asm5
-rw-r--r--travis/test/strlen.json13
-rw-r--r--travis/test/strlen.stderr2
3 files changed, 20 insertions, 0 deletions
diff --git a/travis/test/strlen.asm b/travis/test/strlen.asm
new file mode 100644
index 00000000..913014ce
--- /dev/null
+++ b/travis/test/strlen.asm
@@ -0,0 +1,5 @@
+%macro strlen_test 1
+ %strlen len %2 ; not existing argument
+%endmacro
+
+strlen_test 'a'
diff --git a/travis/test/strlen.json b/travis/test/strlen.json
new file mode 100644
index 00000000..2670c4e5
--- /dev/null
+++ b/travis/test/strlen.json
@@ -0,0 +1,13 @@
+[
+ {
+ "description": "Test strlen error over nonexisting argument",
+ "id": "strlen",
+ "format": "bin",
+ "source": "strlen.asm",
+ "option": "-E -Ox",
+ "target": [
+ { "stderr": "strlen.stderr" }
+ ],
+ "error": "expected"
+ }
+]
diff --git a/travis/test/strlen.stderr b/travis/test/strlen.stderr
new file mode 100644
index 00000000..3e933877
--- /dev/null
+++ b/travis/test/strlen.stderr
@@ -0,0 +1,2 @@
+./travis/test/strlen.asm:5: error: `%strlen' requires string as second parameter
+./travis/test/strlen.asm:2: ... from macro `strlen_test' defined here