summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-07-03 23:55:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-07-03 23:55:17 -0700
commitfe9a0303c60fa1ff636ac866f1cc73f380503d5b (patch)
tree34e285e50664ad79c8017f3180f5aa5a6f9e15e7 /tests
parenteb081ac7627ce7b4e093d4d84ebfa99790008d59 (diff)
downloadtxr-fe9a0303c60fa1ff636ac866f1cc73f380503d5b.tar.gz
txr-fe9a0303c60fa1ff636ac866f1cc73f380503d5b.tar.bz2
txr-fe9a0303c60fa1ff636ac866f1cc73f380503d5b.zip
tests: add @{var1 var2} match test.
* tests/001/query-5.txr: New file. * tests/001/query-5.expected: New file. * Makefile (tst/tests/001/query-5.ok): Pass -B to txr for this new test. * tests/017/glob-carray.expected: Updated, because the glob test globs over the contents of tests/001 directory. * tests/017/glob-zarray.expected: Likewise.
Diffstat (limited to 'tests')
-rw-r--r--tests/001/query-5.expected7
-rw-r--r--tests/001/query-5.txr4
-rw-r--r--tests/017/glob-carray.expected4
-rw-r--r--tests/017/glob-zarray.expected4
4 files changed, 15 insertions, 4 deletions
diff --git a/tests/001/query-5.expected b/tests/001/query-5.expected
new file mode 100644
index 00000000..dddf7240
--- /dev/null
+++ b/tests/001/query-5.expected
@@ -0,0 +1,7 @@
+cmd-rx="#/sshd.*/"
+cmd[0]="sshd: kaz [priv] "
+cmd[1]="sshd: kaz@pts/2 "
+cmd[2]="sshd: kaz [priv] "
+cmd[3]="sshd: kaz@pts/4 "
+cmd[4]="sshd: kaz [priv] "
+cmd[5]="sshd: kaz@pts/1 "
diff --git a/tests/001/query-5.txr b/tests/001/query-5.txr
new file mode 100644
index 00000000..7c1ca45d
--- /dev/null
+++ b/tests/001/query-5.txr
@@ -0,0 +1,4 @@
+@(bind cmd-rx #/sshd.*/)
+@(collect)
+@nil @nil @nil @nil @nil @nil @nil @{cmd cmd-rx}
+@(end)
diff --git a/tests/017/glob-carray.expected b/tests/017/glob-carray.expected
index ac1290e3..cf4b8a5e 100644
--- a/tests/017/glob-carray.expected
+++ b/tests/017/glob-carray.expected
@@ -1,4 +1,4 @@
0
-#S(glob-t pathc 4 pathv #<carray 4 #<ffi-type str-d>> reserve 0)
+#S(glob-t pathc 5 pathv #<carray 5 #<ffi-type str-d>> reserve 0)
#("tests/001/query-1.txr" "tests/001/query-2.txr" "tests/001/query-3.txr"
- "tests/001/query-4.txr")
+ "tests/001/query-4.txr" "tests/001/query-5.txr")
diff --git a/tests/017/glob-zarray.expected b/tests/017/glob-zarray.expected
index cd54b421..f15829ea 100644
--- a/tests/017/glob-zarray.expected
+++ b/tests/017/glob-zarray.expected
@@ -1,4 +1,4 @@
0
-#S(glob-t pathc 4 pathv #("tests/001/query-1.txr" "tests/001/query-2.txr" "tests/001/query-3.txr"
- "tests/001/query-4.txr")
+#S(glob-t pathc 5 pathv #("tests/001/query-1.txr" "tests/001/query-2.txr" "tests/001/query-3.txr"
+ "tests/001/query-4.txr" "tests/001/query-5.txr")
reserve 0)