@@ -81,11 +81,13 @@ func TestRender_ShortLinks(t *testing.T) {
81
81
82
82
rawtree := util .URLJoin (AppSubURL , "raw" , "master" )
83
83
url := util .URLJoin (tree , "Link" )
84
- otherURL := util .URLJoin (tree , "OtherLink " )
84
+ otherURL := util .URLJoin (tree , "Other-Link " )
85
85
imgurl := util .URLJoin (rawtree , "Link.jpg" )
86
+ otherImgurl := util .URLJoin (rawtree , "Link+Other.jpg" )
86
87
urlUncyclo := util .URLJoin (AppSubURL , "wiki" , "Link" )
87
- otherURLUncyclo := util .URLJoin (AppSubURL , "wiki" , "OtherLink " )
88
+ otherURLUncyclo := util .URLJoin (AppSubURL , "wiki" , "Other-Link " )
88
89
imgurlUncyclo := util .URLJoin (AppSubURL , "wiki" , "raw" , "Link.jpg" )
90
+ otherImgurlUncyclo := util .URLJoin (AppSubURL , "wiki" , "raw" , "Link+Other.jpg" )
89
91
favicon := "http://google.com/favicon.ico"
90
92
91
93
test (
@@ -125,7 +127,11 @@ func TestRender_ShortLinks(t *testing.T) {
125
127
`<p><a href="` + imgurl + `" rel="nofollow"><img src="` + imgurl + `" title="Title" alt="AltName"/></a></p>` ,
126
128
`<p><a href="` + imgurlUncyclo + `" rel="nofollow"><img src="` + imgurlUncyclo + `" title="Title" alt="AltName"/></a></p>` )
127
129
test (
128
- "[[Link]] [[OtherLink]]" ,
129
- `<p><a href="` + url + `" rel="nofollow">Link</a> <a href="` + otherURL + `" rel="nofollow">OtherLink</a></p>` ,
130
- `<p><a href="` + urlUncyclo + `" rel="nofollow">Link</a> <a href="` + otherURLUncyclo + `" rel="nofollow">OtherLink</a></p>` )
130
+ "[[Name|Link Other.jpg|alt=\" AltName\" |title='Title']]" ,
131
+ `<p><a href="` + otherImgurl + `" rel="nofollow"><img src="` + otherImgurl + `" title="Title" alt="AltName"/></a></p>` ,
132
+ `<p><a href="` + otherImgurlUncyclo + `" rel="nofollow"><img src="` + otherImgurlUncyclo + `" title="Title" alt="AltName"/></a></p>` )
133
+ test (
134
+ "[[Link]] [[Other Link]]" ,
135
+ `<p><a href="` + url + `" rel="nofollow">Link</a> <a href="` + otherURL + `" rel="nofollow">Other Link</a></p>` ,
136
+ `<p><a href="` + urlUncyclo + `" rel="nofollow">Link</a> <a href="` + otherURLUncyclo + `" rel="nofollow">Other Link</a></p>` )
131
137
}
0 commit comments