PageRenderTime 14ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/test/marks/link.t2t

http://txt2tags.googlecode.com/
Unknown | 100 lines | 98 code | 2 blank | 0 comment | 0 complexity | 006d0dca82fd72e34d4d4840301250db MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, WTFPL
  1. %!includeconf: test.conf
  2. BODYINIT
  3. %%% Syntax: E-mail
  4. user@domain.com
  5. user@domain.com.
  6. user@domain.com. any text.
  7. any text: user@domain.com. any text.
  8. [label user@domain.com]
  9. %%% Syntax: E-mail with form data
  10. user@domain.com?subject=bla
  11. user@domain.com?subject=bla.
  12. user@domain.com?subject=bla,
  13. user@domain.com?subject=bla&cc=otheruser@domain.com
  14. user@domain.com?subject=bla&cc=otheruser@domain.com.
  15. user@domain.com?subject=bla&cc=otheruser@domain.com,
  16. [label user@domain.com?subject=bla&cc=otheruser@domain.com].
  17. [label user@domain.com?subject=bla&cc=otheruser@domain.com.].
  18. %%% Syntax: URL
  19. http://www.domain.com
  20. http://www.domain.com/dir/
  21. http://www.domain.com/dir///
  22. http://www.domain.com.
  23. http://www.domain.com,
  24. http://www.domain.com. any text.
  25. http://www.domain.com, any text.
  26. http://www.domain.com/dir/. any text.
  27. any text: http://www.domain.com. any text.
  28. any text: http://www.domain.com/dir/. any text.
  29. any text: http://www.domain.com/dir/index.html. any text.
  30. any text: http://www.domain.com/dir/index.html, any text.
  31. %%% Syntax: URL with anchor
  32. http://www.domain.com/dir/#anchor
  33. http://www.domain.com/dir/index.html#anchor
  34. http://www.domain.com/dir/index.html#anchor.
  35. http://www.domain.com/dir/#anchor. any text.
  36. http://www.domain.com/dir/index.html#anchor. any text.
  37. any text: http://www.domain.com/dir/#anchor. any text.
  38. any text: http://www.domain.com/dir/index.html#anchor. any text.
  39. %%% Syntax: URL with form data
  40. http://domain.com?a=a@a.a&b=a+b+c.
  41. http://domain.com?a=a@a.a&b=a+b+c,
  42. http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.
  43. http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.
  44. %%% Syntax: URL with form data and anchor
  45. http://domain.com?a=a@a.a&b=a+b+c.#anchor
  46. http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor
  47. http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor
  48. %%% Syntax: URL with login data
  49. http://user:password@domain.com/bla.html.
  50. http://user:password@domain.com/dir/.
  51. http://user:password@domain.com.
  52. http://user:@domain.com.
  53. http://user@domain.com.
  54. %%% Syntax: URL with login, form and anchor
  55. http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor
  56. http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor
  57. %%% Syntax: URL with label
  58. [label www.domain.com]
  59. %%% Syntax: URL with label (trailing spaces are discarded, leading are maintained)
  60. %TODO normalize this behavior
  61. [ label www.domain.com]
  62. [label www.domain.com]
  63. %%% Syntax: URL with label, stressing
  64. [anchor http://www.domain.com/dir/index.html#anchor.]
  65. [login http://user:password@domain.com/bla.html]
  66. [form http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.]
  67. [form & anchor http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor]
  68. [login & form http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.]
  69. %%% Syntax: Link with label for local files
  70. [local link up ..]
  71. [local link file bla.html]
  72. [local link anchor #anchor]
  73. [local link file/anchor bla.html#anchor]
  74. [local link file/anchor bla.html#anchor.]
  75. [local link img abc.gif]
  76. %%% Syntax: Another link as a label
  77. [www.fake.com www.domain.com]
  78. %%% Syntax: URL with funny chars
  79. http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm
  80. http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-
  81. http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_-1%.
  82. http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_-1%.
  83. %%% Test: Various per line
  84. http://L1.com ! L2@www.com ! [L3 www.com] ! [L4 w@ww.com] ! www.L5.com
  85. %%% Feature: Guessed link, adding protocol automatically
  86. www.domain.com
  87. www2.domain.com
  88. ftp.domain.com
  89. WWW.DOMAIN.COM
  90. FTP.DOMAIN.COM
  91. [label www.domain.com]
  92. [label ftp.domain.com]
  93. [label WWW.DOMAIN.COM]
  94. [label FTP.DOMAIN.COM]
  95. %%% Invalid: Trailing space on link
  96. [label www.domain.com ]
  97. %%% Invalid: Label with ] char (use postproc)
  98. [label] www.domain.com]