From d3cf94ea8a6edda25d9b330d3a6523bd5e28dedc Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 1 Oct 2011 20:10:50 -0700 Subject: 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. --- ChangeLog | 11 +++++++++++ Makefile | 1 + tests/008/data | 8 ++++++++ tests/008/tokenize.expected | 8 ++++++++ tests/008/tokenize.txr | 12 ++++++++++++ 5 files changed, 40 insertions(+) create mode 100644 tests/008/data create mode 100644 tests/008/tokenize.expected create mode 100644 tests/008/tokenize.txr diff --git a/ChangeLog b/ChangeLog index a57a1615..d2058bc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-10-01 Kaz Kylheku + + 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 New test case, covering exception handling across nested 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) -- cgit v1.2.3