From b621f404cbf59d8972ca4f9310b0dce2443d04b7 Mon Sep 17 00:00:00 2001 From: Marcus Wellhardh <wellhard@roxen.com> Date: Thu, 10 Feb 2000 12:28:24 +0100 Subject: [PATCH] Added testcase for _set_tag_callback. Rev: src/modules/Parser/testsuite.in:1.26 --- src/modules/Parser/testsuite.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/modules/Parser/testsuite.in b/src/modules/Parser/testsuite.in index 6eb25c54e2..56eaaa827a 100644 --- a/src/modules/Parser/testsuite.in +++ b/src/modules/Parser/testsuite.in @@ -122,6 +122,17 @@ test_any([[ "\'"); return p->finish ("<t> <!-- <t a='> -- --> <!-<t a='> -->")->read(); ]], "x [ <t a='> -- ] {<t a=} -->"); +test_any_equal([[ + object p = Parser.HTML(); + array a = ({ }); + p->_set_tag_callback ( + lambda (object p, string str) { + a += ({ p->tag_name() }); + return 0; + }); + p->finish("<t>x</t>"); + return a; +]], ({ "t", "/t" })); // Current context functions test_any([[{ -- GitLab