def test_repeat_widget
build_page{|src_output, map_output, xml_output|
src_output.print "class MainPage < WPM::PageContext\n"
src_output.print "end\n"
map_output.print "<?xml version=\"1.0\"?>\n"
map_output.print "<map xmlns=\"http://www.freedom.ne.jp/toki/ruby/PageMaker/Map\">\n"
map_output.print "<repeat name=\"Repeat\">\n"
map_output.print "<times type=\"number\">5</times>\n"
map_output.print "</repeat>\n"
map_output.print "</map>\n"
xml_output.print "<?xml version=\"1.0\"?>\n"
xml_output.print "<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:pm=\"http://www.freedom.ne.jp/toki/ruby/PageMaker\">\n"
xml_output.print "<head><title>test of RepeatWidget</title></head>\n"
xml_output.print "<body>\n"
xml_output.print "<p>\n"
xml_output.print "<pm:widget name=\"Repeat\"\n"
xml_output.print ">Hello world.\n"
xml_output.print "</pm:widget\n"
xml_output.print "></p>\n"
xml_output.print "</body>\n"
xml_output.print "</html>\n"
}
dst = "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
dst += "<head><title>test of RepeatWidget</title></head>\n"
dst += "<body>\n"
dst += "<p>\n"
dst += "Hello world.\n"
dst += "Hello world.\n"
dst += "Hello world.\n"
dst += "Hello world.\n"
dst += "Hello world.\n"
dst += "</p>\n"
dst += "</body>\n"
dst += "</html>"
assert_equal(dst, run_page)
assert_equal(0, @params_call)
assert_equal(0, @page_path_call)
end