InterWeb Links
From Jason Blevins: [[Web Name:Page Name]] or [[Web Name:Page Name|alternate label]] produce inter-Web links on the same Instiki installation.
This commit is contained in:
parent
55fdc9fff4
commit
be8bb3d06d
6 changed files with 258 additions and 75 deletions
|
@ -47,6 +47,11 @@ class WikiTest < Test::Unit::TestCase
|
|||
:page_name => 'Sperberg-McQueen')
|
||||
end
|
||||
|
||||
def test_interweb_links
|
||||
match(WikiChunk::Link, 'This is a tricky link [[Froogle:Sperberg-McQueen]]',
|
||||
{:page_name => 'Sperberg-McQueen', :web_name => 'Froogle'})
|
||||
end
|
||||
|
||||
def test_include_chunk_pattern
|
||||
content = 'This is a [[!include pagename]] and [[!include WikiWord]] but [[blah]]'
|
||||
recognized_includes = content.scan(Include.pattern).collect { |m| m[0] }
|
||||
|
@ -81,7 +86,7 @@ class WikiTest < Test::Unit::TestCase
|
|||
# empty link type
|
||||
assert_link_parsed_as 'page name', 'link?:', :show, '[[page name|link?:]]'
|
||||
# unknown link type
|
||||
assert_link_parsed_as 'page name:create_system', 'page name:create_system', :show,
|
||||
assert_link_parsed_as 'create_system', 'page name:create_system', :show,
|
||||
'[[page name:create_system]]'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue