GunChleoc has proposed merging lp:~widelands-dev/widelands/tags_again into lp:widelands.
Commit message: Added a test for the text renderer to make sure that <not_a_tag> does not crash. This test checks Tables, Listselect and MultilineTextarea. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1530124 in widelands: "No escaping of special characters when reading files (maps, save games) leads to crash" https://bugs.launchpad.net/widelands/+bug/1530124 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/tags_again/+merge/284636 A follow-up to a recent bugfix - wrote a regression test for it. -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/tags_again into lp:widelands.
=== added file 'test/maps/plain.wmf/scripting/test_text_renderer_does_not_crash.lua' --- test/maps/plain.wmf/scripting/test_text_renderer_does_not_crash.lua 1970-01-01 00:00:00 +0000 +++ test/maps/plain.wmf/scripting/test_text_renderer_does_not_crash.lua 2016-02-01 15:50:57 +0000 @@ -0,0 +1,21 @@ +include "../data/scripting/messages.lua" +include "../data/scripting/formatting.lua" + +run(function() + sleep(5000) + + -- Test for <not_a_tag> in table and multilinetextarea. + send_message(p1, "Title <not_a_tag>", rt(p("Some text <not_a_tag> more text")), {popup = true}) + sleep(500) + send_message(p1, "Title <not_a_tag>", "Some text <not_a_tag> more text", {popup = true}) + sleep(500) + + -- Test for <not_a_tag> in listselect and multilinetextarea. + p1:add_objective("obj1", "Title 1 <not_a_tag>", rt(p("Some text <not_a_tag> more text"))) + wl.ui.MapView().buttons.objectives:click() + sleep(500) + p1:add_objective("obj2", "Title 2 <not_a_tag>", "Some text <not_a_tag> more text") + + print("# All Tests passed.") + wl.ui.MapView():close() +end)
_______________________________________________ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp