@@ -297,17 +297,6 RAW | |||||
297 | 'project#3' => link_to('eCookbook Subproject 1', project_url, :class => 'project'), |
|
297 | 'project#3' => link_to('eCookbook Subproject 1', project_url, :class => 'project'), | |
298 | 'project:subproject1' => link_to('eCookbook Subproject 1', project_url, :class => 'project'), |
|
298 | 'project:subproject1' => link_to('eCookbook Subproject 1', project_url, :class => 'project'), | |
299 | 'project:"eCookbook subProject 1"' => link_to('eCookbook Subproject 1', project_url, :class => 'project'), |
|
299 | 'project:"eCookbook subProject 1"' => link_to('eCookbook Subproject 1', project_url, :class => 'project'), | |
300 | # escaping |
|
|||
301 | '!#3.' => '#3.', |
|
|||
302 | '!#3-14.' => '#3-14.', |
|
|||
303 | '!#3#-note14.' => '#3#-note14.', |
|
|||
304 | '!r1' => 'r1', |
|
|||
305 | '!document#1' => 'document#1', |
|
|||
306 | '!document:"Test document"' => 'document:"Test document"', |
|
|||
307 | '!version#2' => 'version#2', |
|
|||
308 | '!version:1.0' => 'version:1.0', |
|
|||
309 | '!version:"1.0"' => 'version:"1.0"', |
|
|||
310 | '!source:/some/file' => 'source:/some/file', |
|
|||
311 | # not found |
|
300 | # not found | |
312 | '#0123456789' => '#0123456789', |
|
301 | '#0123456789' => '#0123456789', | |
313 | # invalid expressions |
|
302 | # invalid expressions | |
@@ -319,6 +308,23 RAW | |||||
319 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text), "#{text} failed" } |
|
308 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text), "#{text} failed" } | |
320 | end |
|
309 | end | |
321 |
|
310 | |||
|
311 | def test_escaped_redmine_links_should_not_be_parsed | |||
|
312 | to_test = [ | |||
|
313 | '#3.', | |||
|
314 | '#3-14.', | |||
|
315 | '#3#-note14.', | |||
|
316 | 'r1', | |||
|
317 | 'document#1', | |||
|
318 | 'document:"Test document"', | |||
|
319 | 'version#2', | |||
|
320 | 'version:1.0', | |||
|
321 | 'version:"1.0"', | |||
|
322 | 'source:/some/file' | |||
|
323 | ] | |||
|
324 | @project = Project.find(1) | |||
|
325 | to_test.each { |text| assert_equal "<p>#{text}</p>", textilizable("!" + text), "#{text} failed" } | |||
|
326 | end | |||
|
327 | ||||
322 | def test_cross_project_redmine_links |
|
328 | def test_cross_project_redmine_links | |
323 | source_link = link_to('ecookbook:source:/some/file', {:controller => 'repositories', :action => 'entry', :id => 'ecookbook', :path => ['some', 'file']}, |
|
329 | source_link = link_to('ecookbook:source:/some/file', {:controller => 'repositories', :action => 'entry', :id => 'ecookbook', :path => ['some', 'file']}, | |
324 | :class => 'source') |
|
330 | :class => 'source') |
General Comments 0
You need to be logged in to leave comments.
Login now