# HG changeset patch # User Matthew Wild # Date 1307028090 -3600 # Node ID d7524f66562597d54220fd18dd802c20c5e0b799 # Parent 95f4883da11fb82ae7303d84f2796b2183826e9a Add test for StartDoctypeDecl diff -r 95f4883da11f -r d7524f665625 tests/test.lua --- a/tests/test.lua Thu Jun 02 15:10:38 2011 +0100 +++ b/tests/test.lua Thu Jun 02 16:21:30 2011 +0100 @@ -228,7 +228,18 @@ x = X[6] assert(x[1] == "en" and x[3] == "space" and table.getn(x) == 3) +---------------------------- +print("testing doctype declarations") +callbacks = { + StartDoctypeDecl = getargs + } +p = lxp.new(callbacks) +assert(p:parse([[]])) +assert(p:parse[[]]) +p:close() +assert(X[2] == "root" and X[3] == "hello-world" and X[4] == "foo" and + X[5] == false) -- Error reporting p = lxp.new{}