diff options
Diffstat (limited to 'tests/011/txr-case.txr')
-rw-r--r-- | tests/011/txr-case.txr | 9 |
1 files changed, 9 insertions, 0 deletions
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`)))) |