summaryrefslogtreecommitdiffstats
path: root/tests/011
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-01-17 07:02:58 -0800
committerKaz Kylheku <kaz@kylheku.com>2022-01-17 07:02:58 -0800
commit979a9e38899271c647de29c506b04e753380cb2e (patch)
tree4926f3408ebe3054c925f1ab954151de0cdf3b08 /tests/011
parent4c3316acecc462283c0c853369af93776c478d44 (diff)
downloadtxr-979a9e38899271c647de29c506b04e753380cb2e.tar.gz
txr-979a9e38899271c647de29c506b04e753380cb2e.tar.bz2
txr-979a9e38899271c647de29c506b04e753380cb2e.zip
New function: match-fboundp.
User vapnik spaknik was asking in the mailing list whether there is an existence test for TXR pattern functions. Now there is. * eval.c (eval_init): Register match-fboundp intrinsic. * match.c (match_fbound): New function. * match.h (match_fbound): Declared. * tests/011/txr-case.txr: New test cases. * txr.1: Documented. * stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'tests/011')
-rw-r--r--tests/011/txr-case.txr7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/011/txr-case.txr b/tests/011/txr-case.txr
index aa234ed8..d6d8d788 100644
--- a/tests/011/txr-case.txr
+++ b/tests/011/txr-case.txr
@@ -1,4 +1,5 @@
@(load `@{stdlib}txr-case`)
+@(include "../common")
@(define date (year month day))
@{year /\d\d\d\d/}-@{month /\d\d/}-@{day /\d\d/}
@(end)
@@ -18,4 +19,8 @@ blah
"foo bar"))
(notmatch () (put-line "notexpected"))
- (stuff (y m d a b) (put-line `match: year @y, month @m, day @d, @a:@b`))))
+ (stuff (y m d a b) (put-line `match: year @y, month @m, day @d, @a:@b`)))
+ (mtest
+ (match-fboundp 'notmatch) t
+ (match-fboundp 'stuff) t
+ (match-fboundp 'xyzzy) nil))