summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-11-29 14:47:48 +0100
committerPhilipp Gesang <phg42.2a@gmail.com>2013-11-29 14:47:48 +0100
commitd6cc5e4f2097aae25c013efa73c64033566529f6 (patch)
treec4681d80c12cd05b6c5afb45c7ffaa5d162eadc8
parent1c3cc9603566ac83f6c79eddd39ca61a2d70a7ad (diff)
downloadluatexbase-d6cc5e4f2097aae25c013efa73c64033566529f6.tar.gz
[mcb] add tests for is_active_callback()
-rw-r--r--luatexbase-mcb.dtx3
1 files changed, 3 insertions, 0 deletions
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}