summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--Makefile1
-rw-r--r--tests/008/data8
-rw-r--r--tests/008/tokenize.expected8
-rw-r--r--tests/008/tokenize.txr12
5 files changed, 40 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a57a1615..d2058bc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2011-10-01 Kaz Kylheku <kaz@kylheku.com>
+ Tokenizing test case, exercising for @(coll :gap 0)
+ and horizontal @(choose :shortest ...).
+
+ * Makefile: Defined TXR_ARGS for tests/008 directory.
+
+ * tests/008/data: New file.
+ * tests/008/tokenize.expected: New file.
+ * tests/008/tokenize.txr: New file.
+
+2011-10-01 Kaz Kylheku <kaz@kylheku.com>
+
New test case, covering exception handling across nested
function invocations.
diff --git a/Makefile b/Makefile
index e32cc0b4..82202f65 100644
--- a/Makefile
+++ b/Makefile
@@ -86,6 +86,7 @@ tests/002/%: TXR_OPTS := -DTESTDIR=$(top_srcdir)/tests/002
tests/004/%: TXR_ARGS := -a 123 -b -c
tests/005/%: TXR_ARGS := $(top_srcdir)/tests/005/data
tests/006/%: TXR_ARGS := $(top_srcdir)/tests/006/data
+tests/008/%: TXR_ARGS := $(top_srcdir)/tests/008/data
tests/002/%: TXR_SCRIPT_ON_CMDLINE := y
diff --git a/tests/008/data b/tests/008/data
new file mode 100644
index 00000000..f171c282
--- /dev/null
+++ b/tests/008/data
@@ -0,0 +1,8 @@
+a!===b=!=c
+a!===!==!=!==b
+
+a
+a=
+=
+==
+===
diff --git a/tests/008/tokenize.expected b/tests/008/tokenize.expected
new file mode 100644
index 00000000..86ebd01a
--- /dev/null
+++ b/tests/008/tokenize.expected
@@ -0,0 +1,8 @@
+"a" {!=} "" {==} "b" {=} "" {!=} "c"
+"a" {!=} "" {==} "" {!=} "" {=} "" {!=} "" {!=} "" {=} "b"
+""
+"a"
+"a" {=} ""
+"" {=} ""
+"" {==} ""
+"" {==} "" {=} ""
diff --git a/tests/008/tokenize.txr b/tests/008/tokenize.txr
new file mode 100644
index 00000000..39211ba9
--- /dev/null
+++ b/tests/008/tokenize.txr
@@ -0,0 +1,12 @@
+@(collect)
+@(coll :gap 0)@(choose :shortest tok)@\
+ @tok@{sep /==/}@\
+ @(or)@\
+ @tok@{sep /!=/}@\
+ @(or)@\
+ @tok@{sep /=/}@\
+ @(end)@(end)@tail
+@(output)
+@(rep)"@tok" {@sep} @(end)"@tail"
+@(end)
+@(end)