1use strict; 2use warnings; 3use t::TestTextTrac; 4 5run_tests; 6 7__DATA__ 8 9### ticket link test 1 10--- input 11#1 12--- expected 13<p> 14<a class="ticket" href="http://trac.mizzy.org/public/ticket/1">#1</a> 15</p> 16 17### ticket link test 2 18--- input 19ticket:1 20--- expected 21<p> 22<a class="ticket" href="http://trac.mizzy.org/public/ticket/1">ticket:1</a> 23</p> 24 25### ticket link test 3 26--- input 27!#1 28--- expected 29<p> 30#1 31</p> 32 33### ticket link test 4 34--- input 35!ticket:1 36--- expected 37<p> 38ticket:1 39</p> 40 41### ticket link test 5 42--- input 43[ticket:1] 44--- expected 45<p> 46<a class="ticket" href="http://trac.mizzy.org/public/ticket/1">1</a> 47</p> 48 49### ticket link test 6 50--- input 51[ticket:1 ticket 1] 52--- expected 53<p> 54<a class="ticket" href="http://trac.mizzy.org/public/ticket/1">ticket 1</a> 55</p> 56 57### ticket link test 7 58--- input 59![ticket:1] 60--- expected 61<p> 62[ticket:1] 63</p> 64 65### report link test 1 66--- input 67{1} 68--- expected 69<p> 70<a class="report" href="http://trac.mizzy.org/public/report/1">{1}</a> 71</p> 72 73### report link test 2 74--- input 75report:1 76--- expected 77<p> 78<a class="report" href="http://trac.mizzy.org/public/report/1">report:1</a> 79</p> 80 81### report link test 3 82--- input 83!{1} 84--- expected 85<p> 86{1} 87</p> 88 89### report link test 4 90--- input 91!report:1 92--- expected 93<p> 94report:1 95</p> 96 97### report link test 5 98--- input 99[report:1] 100--- expected 101<p> 102<a class="report" href="http://trac.mizzy.org/public/report/1">1</a> 103</p> 104 105### report link test 6 106--- input 107[report:1 report 1] 108--- expected 109<p> 110<a class="report" href="http://trac.mizzy.org/public/report/1">report 1</a> 111</p> 112 113### report link test 7 114--- input 115![report:1] 116--- expected 117<p> 118[report:1] 119</p> 120 121### changeset link test 1 122--- input 123[1] 124--- expected 125<p> 126<a class="changeset" href="http://trac.mizzy.org/public/changeset/1">[1]</a> 127</p> 128 129### changeset link test 2 130--- input 131changeset:1 132--- expected 133<p> 134<a class="changeset" href="http://trac.mizzy.org/public/changeset/1">changeset:1</a> 135</p> 136 137### changeset link test 3 138--- input 139r1 140--- expected 141<p> 142<a class="changeset" href="http://trac.mizzy.org/public/changeset/1">r1</a> 143</p> 144 145### changeset link test 4 146--- input 147[changeset:1] 148--- expected 149<p> 150<a class="changeset" href="http://trac.mizzy.org/public/changeset/1">1</a> 151</p> 152 153### changeset link test 5 154--- input 155[changeset:1 changeset 1] 156--- expected 157<p> 158<a class="changeset" href="http://trac.mizzy.org/public/changeset/1">changeset 1</a> 159</p> 160 161### changeset link test 6 162--- input 163![1] 164--- expected 165<p> 166[1] 167</p> 168 169### changeset link test 7 170--- input 171!changeset:1 172--- expected 173<p> 174changeset:1 175</p> 176 177 178### changeset link test 8 179--- input 180!r1 181--- expected 182<p> 183r1 184</p> 185 186### changeset link test 9 187--- input 188![changeset:1] 189--- expected 190<p> 191[changeset:1] 192</p> 193 194 195 196### revision log link test 1 197--- input 198r1:3 199--- expected 200<p> 201<a class="source" href="http://trac.mizzy.org/public/log/?rev=3&stop_rev=1">r1:3</a> 202</p> 203 204### revision log link test 2 205--- input 206[1:3] 207--- expected 208<p> 209<a class="source" href="http://trac.mizzy.org/public/log/?rev=3&stop_rev=1">[1:3]</a> 210</p> 211 212### revision log link test 3 213--- input 214log:#1:3 215--- expected 216<p> 217<a class="source" href="http://trac.mizzy.org/public/log/?rev=3&stop_rev=1">log:#1:3</a> 218</p> 219 220### revision log link test 4 221--- input 222[log:#1:3] 223--- expected 224<p> 225<a class="source" href="http://trac.mizzy.org/public/log/?rev=3&stop_rev=1">#1:3</a> 226</p> 227 228### revision log link test 5 229--- input 230[log:#1:3 log 1 - 3] 231--- expected 232<p> 233<a class="source" href="http://trac.mizzy.org/public/log/?rev=3&stop_rev=1">log 1 - 3</a> 234</p> 235 236### wiki link test 1 237--- input 238TracLinks 239--- expected 240<p> 241<a class="wiki" href="http://trac.mizzy.org/public/wiki/TracLinks">TracLinks</a> 242</p> 243 244### wiki link test 2 245--- input 246wiki:trac_links 247--- expected 248<p> 249<a class="wiki" href="http://trac.mizzy.org/public/wiki/trac_links">wiki:trac_links</a> 250</p> 251 252### wiki link test 3 253--- input 254!TracLinks 255--- expected 256<p> 257TracLinks 258</p> 259 260### wiki link test 4 261--- input 262!wiki:TracLinks 263--- expected 264<p> 265wiki:TracLinks 266</p> 267 268### wiki link test 5 269--- input 270[wiki:TracLinks Trac Links] 271--- expected 272<p> 273<a class="wiki" href="http://trac.mizzy.org/public/wiki/TracLinks">Trac Links</a> 274</p> 275 276### milestone link test 1 277--- input 278milestone:1.0 279--- expected 280<p> 281<a class="milestone" href="http://trac.mizzy.org/public/milestone/1.0">milestone:1.0</a> 282</p> 283 284### milestone link test 2 285--- input 286[milestone:1.0] 287--- expected 288<p> 289<a class="milestone" href="http://trac.mizzy.org/public/milestone/1.0">1.0</a> 290</p> 291 292### milestone link test 3 293--- input 294[milestone:1.0 milestone 1.0] 295--- expected 296<p> 297<a class="milestone" href="http://trac.mizzy.org/public/milestone/1.0">milestone 1.0</a> 298</p> 299 300### milestone link test 4 301--- input 302!milestone:1.0 303--- expected 304<p> 305milestone:1.0 306</p> 307 308### milestone link test 5 309--- input 310![milestone:1.0] 311--- expected 312<p> 313[milestone:1.0] 314</p> 315 316### attahcment link test 1 317--- input 318attachment:ticket:33:DSCF0001.jpg 319--- expected 320<p> 321<a class="attachment" href="http://trac.mizzy.org/public/attachment/ticket/33/DSCF0001.jpg">attachment:ticket:33:DSCF0001.jpg</a> 322</p> 323 324### attahcment link test 2 325--- input 326attachment:wiki:TracLinks:DSCF0001.jpg 327--- expected 328<p> 329<a class="attachment" href="http://trac.mizzy.org/public/attachment/wiki/TracLinks/DSCF0001.jpg">attachment:wiki:TracLinks:DSCF0001.jpg</a> 330</p> 331 332### attahcment link test 3 333--- input 334[attachment:ticket:33:DSCF0001.jpg] 335--- expected 336<p> 337<a class="attachment" href="http://trac.mizzy.org/public/attachment/ticket/33/DSCF0001.jpg">ticket:33:DSCF0001.jpg</a> 338</p> 339 340### attahcment link test 4 341--- input 342[attachment:ticket:33:DSCF0001.jpg file] 343--- expected 344<p> 345<a class="attachment" href="http://trac.mizzy.org/public/attachment/ticket/33/DSCF0001.jpg">file</a> 346</p> 347 348### attahcment link test 5 349--- input 350!attachment:ticket:33:DSCF0001.jpg 351--- expected 352<p> 353attachment:ticket:33:DSCF0001.jpg 354</p> 355 356### attahcment link test 6 357--- input 358!attachment:wiki:TracLinks:DSCF0001.jpg 359--- expected 360<p> 361attachment:wiki:TracLinks:DSCF0001.jpg 362</p> 363 364### attahcment link test 7 365--- input 366![attachment:wiki:TracLinks:DSCF0001.jpg] 367--- expected 368<p> 369[attachment:wiki:TracLinks:DSCF0001.jpg] 370</p> 371 372### source link test 1 373--- input 374source:trunk/COPYING 375--- expected 376<p> 377<a class="source" href="http://trac.mizzy.org/public/browser/trunk/COPYING">source:trunk/COPYING</a> 378</p> 379 380### source link test 2 381--- input 382source:trunk/COPYING#200 383--- expected 384<p> 385<a class="source" href="http://trac.mizzy.org/public/browser/trunk/COPYING?rev=200">source:trunk/COPYING#200</a> 386</p> 387 388### source link test 3 389--- input 390[source:trunk/COPYING] 391--- expected 392<p> 393<a class="source" href="http://trac.mizzy.org/public/browser/trunk/COPYING">trunk/COPYING</a> 394</p> 395 396### source link test 4 397--- input 398[source:trunk/COPYING COPYING] 399--- expected 400<p> 401<a class="source" href="http://trac.mizzy.org/public/browser/trunk/COPYING">COPYING</a> 402</p> 403 404### source link test 5 405--- input 406[source:trunk/COPYING#200] 407--- expected 408<p> 409<a class="source" href="http://trac.mizzy.org/public/browser/trunk/COPYING?rev=200">trunk/COPYING#200</a> 410</p> 411 412### source link test 6 413--- input 414[source:trunk/COPYING#200 COPYING] 415--- expected 416<p> 417<a class="source" href="http://trac.mizzy.org/public/browser/trunk/COPYING?rev=200">COPYING</a> 418</p> 419 420### source link test 7 421--- input 422!source:trunk/COPYING 423--- expected 424<p> 425source:trunk/COPYING 426</p> 427 428### source link test 8 429--- input 430!source:trunk/COPYING#200 431--- expected 432<p> 433source:trunk/COPYING#200 434</p> 435 436### source link test 9 437--- input 438![source:trunk/COPYING] 439--- expected 440<p> 441[source:trunk/COPYING] 442</p> 443 444### escaping links and wiki page names 445--- input 446== EscapingLinksand!WikiPageNames == 447--- expected 448<h2 id="EscapingLinksandWikiPageNames"><a class="wiki" href="http://trac.mizzy.org/public/wiki/EscapingLinksand">EscapingLinksand</a>WikiPageNames</h2> 449 450### comment link test 1 451--- input 452comment:ticket:1:8 453--- expected 454<p> 455<a class="ticket" href="http://trac.mizzy.org/public/ticket/1#comment:8">comment:ticket:1:8</a> 456</p> 457