diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-10-01 20:48:01 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-10-01 20:48:01 -0700 |
commit | 1357aa110c41f558e18342e3597c7168450acac8 (patch) | |
tree | 2a76006c0e5fd023174e0a724fe77fae9d5ea94c | |
parent | 460af4151d3cf4ee42a69ca166555b2e17bb73a8 (diff) | |
download | txr-1357aa110c41f558e18342e3597c7168450acac8.tar.gz txr-1357aa110c41f558e18342e3597c7168450acac8.tar.bz2 txr-1357aa110c41f558e18342e3597c7168450acac8.zip |
New test case, covering some filtering from HTML/XML.
* Makefile: Defined TXR_ARGS for new test case.
* tests/008/students.expected: New file.
* tests/008/students.txr: New file.
* tests/008/students.xml: New file.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | tests/008/students.expected | 0 | ||||
-rw-r--r-- | tests/008/students.txr | 22 | ||||
-rw-r--r-- | tests/008/students.xml | 9 |
5 files changed, 42 insertions, 0 deletions
@@ -1,5 +1,15 @@ 2011-10-01 Kaz Kylheku <kaz@kylheku.com> + New test case, covering some filtering from HTML/XML. + + * Makefile: Defined TXR_ARGS for new test case. + + * tests/008/students.expected: New file. + * tests/008/students.txr: New file. + * tests/008/students.xml: New file. + +2011-10-01 Kaz Kylheku <kaz@kylheku.com> + * filter.c (filters, filter_init): Serious gc bug fixed: neglected to inform the garbage collector about the filters global variable. Ouch! @@ -88,6 +88,7 @@ tests/005/%: TXR_ARGS := $(top_srcdir)/tests/005/data tests/006/%: TXR_ARGS := $(top_srcdir)/tests/006/data tests/008/tokenize.ok: TXR_ARGS := $(top_srcdir)/tests/008/data tests/008/configfile.ok: TXR_ARGS := $(top_srcdir)/tests/008/configfile +tests/008/students.ok: TXR_ARGS := $(top_srcdir)/tests/008/students.xml tests/002/%: TXR_SCRIPT_ON_CMDLINE := y diff --git a/tests/008/students.expected b/tests/008/students.expected new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/tests/008/students.expected diff --git a/tests/008/students.txr b/tests/008/students.txr new file mode 100644 index 00000000..5fc4e25c --- /dev/null +++ b/tests/008/students.txr @@ -0,0 +1,22 @@ +<Students> +@(collect) +@ (cases) + <Student Name="@NAME" Gender="@GENDER"@/ +/DateOfBirth="@YEAR-@MONTH-@DAY"@/.*/ +@ (or) + <Student DateOfBirth="@YEAR-@MONTH-@DAY" Gender="@GENDER" Name="@NAME"@/.*/ +@ (end) +@ (maybe) + <Pet Type="@PET_TYPE" Name="@PET_NAME" /> +@ (or) +@ (bind PET_TYPE "none") +@ (bind PET_NAME "") +@ (end) +@(until) +</Students> +@(end) +@(output :filter :from_html) +NAME G DOB PET +@ (repeat) +@{NAME 12} @GENDER @YEAR-@MONTH-@DAY @PET_TYPE @PET_NAME +@ (end) +@(end) diff --git a/tests/008/students.xml b/tests/008/students.xml new file mode 100644 index 00000000..05c2b162 --- /dev/null +++ b/tests/008/students.xml @@ -0,0 +1,9 @@ +<Students> + <Student Name="April" Gender="F" DateOfBirth="1989-01-02" /> + <Student Name="Bob" Gender="M" DateOfBirth="1990-03-04" /> + <Student Name="Chad" Gender="M" DateOfBirth="1991-05-06" /> + <Student Name="Dave" Gender="M" DateOfBirth="1992-07-08"> + <Pet Type="dog" Name="Rover" /> + </Student> + <Student DateOfBirth="1993-09-10" Gender="F" Name="Émily" /> +</Students> |