From d6cc5e4f2097aae25c013efa73c64033566529f6 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 29 Nov 2013 14:47:48 +0100 Subject: [mcb] add tests for is_active_callback() --- luatexbase-mcb.dtx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'luatexbase-mcb.dtx') diff --git a/luatexbase-mcb.dtx b/luatexbase-mcb.dtx index 0c1f687..557f41d 100644 --- a/luatexbase-mcb.dtx +++ b/luatexbase-mcb.dtx @@ -948,13 +948,16 @@ local function sample(head,...) return head, true end local prio = luatexbase.priority_in_callback +local is_active = luatexbase.is_active_callback msg("\n*********\n* Testing management functions\n*********") luatexbase.add_to_callback("hpack_filter", sample, "sample one", 1) luatexbase.add_to_callback("hpack_filter", sample, "sample two", 2) luatexbase.add_to_callback("hpack_filter", sample, "sample three", 1) assert(prio("hpack_filter", "sample three")) +assert(is_active("hpack_filter", "sample three") == true) luatexbase.remove_from_callback("hpack_filter", "sample three") assert(not prio("hpack_filter", "sample three")) +assert(is_active("hpack_filter", "sample three") == false) luatexbase.reset_callback("hpack_filter") assert(not prio("hpack_filter", "sample one")) % \end{macrocode} -- cgit v1.2.3