[Test]
def load_func():
source = detab("""
<func>
function lua_func()
print "lua stuff"
end
--
-- need to call the function - like a
-- normal lua program in that respect
--
lua_func()
</func>
""")
using r = XmlReader.Create(StringReader(source)):
r.ReadToFollowing("func")
func = Func()
func.load(r)
assert func.code == sourcedef load_func():
source = detab("""
<func>
function lua_func()
print "lua stuff"
end
--
-- need to call the function - like a
-- normal lua program in that respect
--
lua_func()
</func>
""")
using r = XmlReader.Create(StringReader(source)):
r.ReadToFollowing("func")
func = Func()
func.load(r)
I should do a version with lots of odd chars embedded in it, just to make sure entity conversion kicks in and doesn't break the XML.
But let's do the simple case first
No comments:
Post a Comment