diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/011/txr-case.expected | 4 | ||||
-rw-r--r-- | tests/011/txr-case.txr | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/011/txr-case.expected b/tests/011/txr-case.expected new file mode 100644 index 00000000..4af473e5 --- /dev/null +++ b/tests/011/txr-case.expected @@ -0,0 +1,4 @@ +no match for 09-10-20 +match: year 2009, month 10, day 20 +no match for July-15-2014 +no match for foo diff --git a/tests/011/txr-case.txr b/tests/011/txr-case.txr new file mode 100644 index 00000000..f427be9e --- /dev/null +++ b/tests/011/txr-case.txr @@ -0,0 +1,9 @@ +@(include `@stdlib/txr-case`) +@(define date (year month day)) +@{year /\d\d\d\d/}-@{month /\d\d/}-@{day /\d\d/} +@(end) +@(do + (each ((date '("09-10-20" "2009-10-20" "July-15-2014" "foo"))) + (txr-if date (y m d) date + (put-line `match: year @y, month @m, day @d`) + (put-line `no match for @date`)))) |