summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2010-02-28 17:12:09 +0900
committerKaz Kylheku <kaz@kylheku.com>2010-02-28 17:12:09 +0900
commit7832f59b3b55ce7ff2ecd2e96a689966840d6f24 (patch)
tree864889a9e07900f0296581275d857b0aac46dc3f
parentb0355cff2e7e2adf44674ca4fe1bdde77557809e (diff)
downloadtxr-7832f59b3b55ce7ff2ecd2e96a689966840d6f24.tar.gz
txr-7832f59b3b55ce7ff2ecd2e96a689966840d6f24.tar.bz2
txr-7832f59b3b55ce7ff2ecd2e96a689966840d6f24.zip
New testcase for freeform.
-rw-r--r--ChangeLog13
-rw-r--r--Makefile1
-rw-r--r--tests/006/data9
-rw-r--r--tests/006/freeform-1.expected17
-rw-r--r--tests/006/freeform-1.txr5
5 files changed, 45 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cf797313..a8964d6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-28 Kaz Kylheku <kkylheku@gmail.com>
+
+ New testcase for freeform.
+
+ * tests/006/data: New UTF-8 file.
+
+ * tests/006/freeform-1.txr: Likewise.
+
+ * tests/006/freeform-1.expected: Likewise.
+
+ * Makefile (TXR_ARGS): New target-specific assignment to set
+ data for test case set 006.
+
2010-02-27 Kaz Kylheku <kkylheku@gmail.com>
* lib.c (length_str_gt, length_str_ge, length_str_lt, length_str_le):
diff --git a/Makefile b/Makefile
index 1aabe1a2..74a64f2f 100644
--- a/Makefile
+++ b/Makefile
@@ -85,6 +85,7 @@ tests/001/%: TXR_ARGS := $(top_srcdir)/tests/001/data
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/002/%: TXR_SCRIPT_ON_CMDLINE := y
diff --git a/tests/006/data b/tests/006/data
new file mode 100644
index 00000000..3beacd87
--- /dev/null
+++ b/tests/006/data
@@ -0,0 +1,9 @@
+a b c
+1 2
+
+d e f
+3 4
+
+g h i
+5 6
+7 8
diff --git a/tests/006/freeform-1.expected b/tests/006/freeform-1.expected
new file mode 100644
index 00000000..4ffb8945
--- /dev/null
+++ b/tests/006/freeform-1.expected
@@ -0,0 +1,17 @@
+first[0]="a"
+first[1]="d"
+first[2]="g"
+second[0]="b"
+second[1]="e"
+second[2]="h"
+third[0]="c"
+third[1]="f"
+third[2]="i"
+val_0[0]="1"
+val_1[0]="2"
+val_0[1]="3"
+val_1[1]="4"
+val_0[2]="5"
+val_1[2]="6"
+val_2[2]="7"
+val_3[2]="8"
diff --git a/tests/006/freeform-1.txr b/tests/006/freeform-1.txr
new file mode 100644
index 00000000..93cf4210
--- /dev/null
+++ b/tests/006/freeform-1.txr
@@ -0,0 +1,5 @@
+@(collect)
+@first @second @third
+@(freeform)
+@(coll)@{val /[0-9]+/}@(until)@\n@\n@(end)
+@(end)