diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-08-12 07:27:40 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-08-12 07:27:40 -0700 |
commit | 8814829f386cb8b4fd89b969f0188d26bb61440d (patch) | |
tree | 9a81eb8e4348da67f31de813380ea065d7fb1557 | |
parent | 0afd465e3a1b68abfb133b02cc017a9e224bf9f4 (diff) | |
download | txr-8814829f386cb8b4fd89b969f0188d26bb61440d.tar.gz txr-8814829f386cb8b4fd89b969f0188d26bb61440d.tar.bz2 txr-8814829f386cb8b4fd89b969f0188d26bb61440d.zip |
tests: add test related to recent @(collect) change.
This test will misbehave on TXR without the previous fix;
it will not collect columns of data which keep the
corresponding rows items together.
* tests/002/variant, tests/002/variant.expected,
tests/002/variant.txr: New files.
* Makefile (TXR_ARGS, TXR_OPTS): Override for new test.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | tests/002/variant | 8 | ||||
-rw-r--r-- | tests/002/variant.expected | 7 | ||||
-rw-r--r-- | tests/002/variant.txr | 18 |
4 files changed, 35 insertions, 0 deletions
@@ -372,6 +372,8 @@ tst/tests/001/query-2.ok: TXR_OPTS := -B tst/tests/001/query-4.ok: TXR_OPTS := -B tst/tests/001/query-5.ok: TXR_OPTS := -B tst/tests/002/%: TXR_OPTS := -C 142 -DTESTDIR=tests/002 +tst/tests/002/variant.ok: TXR_ARGS := tests/002/variant +tst/tests/002/variant.ok: TXR_OPTS := -C 300 tst/tests/004/%: TXR_ARGS := -a 123 -b -c tst/tests/005/%: TXR_ARGS := tests/005/data tst/tests/005/%: TXR_OPTS := -B diff --git a/tests/002/variant b/tests/002/variant new file mode 100644 index 00000000..84d67ff5 --- /dev/null +++ b/tests/002/variant @@ -0,0 +1,8 @@ +zero + +one two three +four five six seven +eight nine ten eleven +twelve thirteen +fourteen +fifteen diff --git a/tests/002/variant.expected b/tests/002/variant.expected new file mode 100644 index 00000000..78ecccb1 --- /dev/null +++ b/tests/002/variant.expected @@ -0,0 +1,7 @@ +zero-*-%-$ +one-two-three-$ +four-five-six-seven +eight-nine-ten-eleven +twelve-thirteen-%-$ +fourteen-*-%-$ +fifteen-*-%-$ diff --git a/tests/002/variant.txr b/tests/002/variant.txr new file mode 100644 index 00000000..21868957 --- /dev/null +++ b/tests/002/variant.txr @@ -0,0 +1,18 @@ +@(collect :vars (f1 (f2 "*") (f3 "%") (f4 "$"))) +@ (cases) + +@ (or) +@f1 @f2 @f3 @f4 +@ (or) +@f1 @f2 @f3 +@ (or) +@f1 @f2 +@ (or) +@f1 +@ (end) +@(end) +@(output) +@ (repeat) +@f1-@f2-@f3-@f4 +@ (end) +@(end) |