Test for text_list

Add a functional test for
the new feature.
This commit is contained in:
Jacques Distler 2010-10-09 11:21:41 -05:00
parent fece5a3486
commit b1fcc93aa5
2 changed files with 26 additions and 3 deletions

View file

@ -19,12 +19,14 @@
<input type="hidden" name="category" value="<%= params['category'] %>"/> <input type="hidden" name="category" value="<%= params['category'] %>"/>
<%- end -%> <%- end -%>
<ul id="sortable_pages" style="list-style-type:none"> <ul id="sortable_pages" style="list-style-type:none">
<%- @pages_in_category.each do |page| -%> <% @pages_in_category.each do |page| %>
<% content_tag_for :li, page do %> <% content_tag_for :li, page do %>
<input type="checkbox" name="<%= page.name %>" value="tex"/> <input type="checkbox" name="<%= page.name %>" value="tex"/>
<%= link_to_existing_page page, truncate(page.plain_name, :length => 35) %> <%= link_to_existing_page page, truncate(page.plain_name, :length => 35) %>
<% end %> <% end %>
<%- end -%>
<% end %>
</ul> </ul>
<%= sortable_element('sortable_pages') %> <%= sortable_element('sortable_pages') %>
<p> Export selected pages (drag to re-order them) to a LaTeX file. <p> Export selected pages (drag to re-order them) to a LaTeX file.

View file

@ -1341,6 +1341,27 @@ Page2 contents $\mathbb{01234}$.
\end{document}
!, r.body
end
def test_tex_list
@wiki.write_page('wiki1', 'Page2',
"Page2 contents $\\mathbb{01234}$.\n",
Time.now, Author.new('AnotherAuthor', '127.0.0.2'), x_test_renderer)
r = process('tex_list', 'web' => 'wiki1', 'Page2' => 'tex', 'BogusPage'=> 'tex', 'HomePage' => 'tex')
assert_response(:success)
assert_equal @tex_header1 + "\\usepackage{mathbbol}\n" + @tex_header2 + %q!\section*{Page2}
Page2 contents $\mathbb{01234}$.
\section*{HomePage}
HisWay would be MyWay $\sin(x) \includegraphics[width=3em]{foo}$ in kinda ThatWay in HisWay though MyWay $\backslash$OverThere --{} see SmartEngine in that SmartEngineGUI
\end{document} \end{document}
!, r.body !, r.body
end end