Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 255 lines (192 sloc) 12.271 kb
4cb08c8 Add readme and sample files
Matt Sanford authored
1
2 tests:
3 usernames:
4 - description: "Autolink trailing username"
5 text: "text @username"
6 expected: "text @<a class=\"tweet-url username\" href=\"http://twitter.com/username\">username</a>"
8977065 Fill in the remainder of the user autolinking specs from the original Ru...
Matt Sanford authored
7
b23c6aa Add a few more username autolink tests (mostly to test git submodules)
Matt Sanford authored
8 - description: "Autolink username at the beginning"
9 text: "@username text"
10 expected: "@<a class=\"tweet-url username\" href=\"http://twitter.com/username\">username</a> text"
8977065 Fill in the remainder of the user autolinking specs from the original Ru...
Matt Sanford authored
11
12 - description: "DO NOT Autolink username preceded by a letter"
b23c6aa Add a few more username autolink tests (mostly to test git submodules)
Matt Sanford authored
13 text: "meet@the beach"
14 expected: "meet@the beach"
8977065 Fill in the remainder of the user autolinking specs from the original Ru...
Matt Sanford authored
15
e32214a Add a few more username autolink tests (mostly to test git submodules)
Matt Sanford authored
16 - description: "Autolink username preceded by puctuation"
17 text: "great.@username"
18 expected: "great.@<a class=\"tweet-url username\" href=\"http://twitter.com/username\">username</a>"
8977065 Fill in the remainder of the user autolinking specs from the original Ru...
Matt Sanford authored
19
20 - description: "Autolink username followed by puctuation"
21 text: "@username&^$%^"
22 expected: "@<a class=\"tweet-url username\" href=\"http://twitter.com/username\">username</a>&^$%^"
23
24 - description: "Autolink username followed by Japanese"
25 text: "@usernameの"
26 expected: "@<a class=\"tweet-url username\" href=\"http://twitter.com/username\">username</a>の"
27
28 - description: "Autolink username preceded by Japanese"
29 text: "あ@username"
30 expected: "あ@<a class=\"tweet-url username\" href=\"http://twitter.com/username\">username</a>"
31
32 - description: "Autolink username surrounded by Japanese"
e194a08 Fix bug in conformance test data: autolinking surrounded by Japanese
Matt Sanford authored
33 text: "あ@usernameの"
8977065 Fill in the remainder of the user autolinking specs from the original Ru...
Matt Sanford authored
34 expected: "あ@<a class=\"tweet-url username\" href=\"http://twitter.com/username\">username</a>の"
35
36 - description: "Autolink username with full-width at sign (U+FF20)"
37 text: "@username"
38 expected: "@<a class=\"tweet-url username\" href=\"http://twitter.com/username\">username</a>"
39
40 - description: "DO NOT Autolink username over 20 characters"
41 text: "@username9012345678901"
d6c92bb Fix bug in conformance test data: autolinking username > 20 chars (redux...
Matt Sanford authored
42 expected: "@<a class=\"tweet-url username\" href=\"http://twitter.com/username901234567890\">username901234567890</a>1"
4cb08c8 Add readme and sample files
Matt Sanford authored
43 lists:
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
44 - description: "Autolink list preceded by a space"
4cb08c8 Add readme and sample files
Matt Sanford authored
45 text: "text @username/list"
46 expected: "text @<a class=\"tweet-url list-slug\" href=\"http://twitter.com/username/list\">username/list</a>"
ba63a8a Remove trailing spaces. Re-order autolink conformance data
Matt Sanford authored
47
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
48 - description: "DO NOT Autolink list when space follows slash"
49 text: "text @username/ list"
50 expected: "text @<a class=\"tweet-url username\" href=\"http://twitter.com/username\">username</a>/ list"
ba63a8a Remove trailing spaces. Re-order autolink conformance data
Matt Sanford authored
51
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
52 - description: "DO NOT Autolink list with empty username"
53 text: "text @/list"
54 expected: "text @/list"
ba63a8a Remove trailing spaces. Re-order autolink conformance data
Matt Sanford authored
55
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
56 - description: "Autolink list at the beginning"
57 text: "@username/list"
58 expected: "@<a class=\"tweet-url list-slug\" href=\"http://twitter.com/username/list\">username/list</a>"
ba63a8a Remove trailing spaces. Re-order autolink conformance data
Matt Sanford authored
59
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
60 - description: "DO NOT Autolink list preceded by letter"
61 text: "meet@the/beach"
62 expected: "meet@the/beach"
ba63a8a Remove trailing spaces. Re-order autolink conformance data
Matt Sanford authored
63
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
64 - description: "Autolink list preceded by puctuation"
65 text: "great.@username/list"
66 expected: "great.@<a class=\"tweet-url list-slug\" href=\"http://twitter.com/username/list\">username/list</a>"
ba63a8a Remove trailing spaces. Re-order autolink conformance data
Matt Sanford authored
67
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
68 - description: "Autolink list followed by puctuation"
69 text: "@username/list&^$%^"
70 expected: "@<a class=\"tweet-url list-slug\" href=\"http://twitter.com/username/list\">username/list</a>&^$%^"
ba63a8a Remove trailing spaces. Re-order autolink conformance data
Matt Sanford authored
71
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
72 - description: "Autolink list name over 80 characters (truncated to 80)"
73 text: "@username/list5678901234567890123456789012345678901234567890123456789012345678901234567890A"
74 expected: "@<a class=\"tweet-url list-slug\" href=\"http://twitter.com/username/list5678901234567890123456789012345678901234567890123456789012345678901234567890\">username/list5678901234567890123456789012345678901234567890123456789012345678901234567890</a>A"
75
4cb08c8 Add readme and sample files
Matt Sanford authored
76 hashtags:
77 - description: "Autolink trailing hashtag"
78 text: "text #hashtag"
79 expected: "text <a href=\"http://twitter.com/search?q=%23hashtag\" title=\"#hashtag\" class=\"tweet-url hashtag\">#hashtag</a>"
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
80
81 - description: "Autolink alphanumeric hashtag (letter-number-letter)"
82 text: "text #hash0tag"
83 expected: "text <a href=\"http://twitter.com/search?q=%23hash0tag\" title=\"#hash0tag\" class=\"tweet-url hashtag\">#hash0tag</a>"
84
85 - description: "Autolink alphanumeric hashtag (number-letter)"
86 text: "text #1tag"
87 expected: "text <a href=\"http://twitter.com/search?q=%231tag\" title=\"#1tag\" class=\"tweet-url hashtag\">#1tag</a>"
88
89 - description: "Autolink hashtag with underscore"
90 text: "text #hash_tag"
91 expected: "text <a href=\"http://twitter.com/search?q=%23hash_tag\" title=\"#hash_tag\" class=\"tweet-url hashtag\">#hash_tag</a>"
92
93 - description: "DO NOT Autolink all-numeric hashtags"
94 text: "text #1234"
95 expected: "text #1234"
ba63a8a Remove trailing spaces. Re-order autolink conformance data
Matt Sanford authored
96
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
97 - description: "DO NOT Autolink hashtag preceded by a letter"
98 text: "text#hashtag"
99 expected: "text#hashtag"
ba63a8a Remove trailing spaces. Re-order autolink conformance data
Matt Sanford authored
100
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
101 - description: "Autolink multiple hashtags"
102 text: "text #hashtag1 #hashtag2"
103 expected: "text <a href=\"http://twitter.com/search?q=%23hashtag1\" title=\"#hashtag1\" class=\"tweet-url hashtag\">#hashtag1</a> <a href=\"http://twitter.com/search?q=%23hashtag2\" title=\"#hashtag2\" class=\"tweet-url hashtag\">#hashtag2</a>"
ba63a8a Remove trailing spaces. Re-order autolink conformance data
Matt Sanford authored
104
dae9d93 Fill in hashtag auto linking based on Ruby specs
Matt Sanford authored
105 - description: "Autolink hashtag preceded by a period"
106 text: "text.#hashtag"
107 expected: "text.<a href=\"http://twitter.com/search?q=%23hashtag\" title=\"#hashtag\" class=\"tweet-url hashtag\">#hashtag</a>"
108
109 - description: "DO NOT Autolink hashtag preceded by &"
110 text: "&#nbsp;"
111 expected: "&#nbsp;"
112
113 - description: "Autolink hashtag followed by ! (! not included)"
114 text: "text #hashtag!"
115 expected: "text <a href=\"http://twitter.com/search?q=%23hashtag\" title=\"#hashtag\" class=\"tweet-url hashtag\">#hashtag</a>!"
116
117 - description: "Autolink hashtag followed by Japanese"
118 text: "text #hashtagの"
119 expected: "text <a href=\"http://twitter.com/search?q=%23hashtag\" title=\"#hashtag\" class=\"tweet-url hashtag\">#hashtag</a>の"
120
121 - description: "Autolink hashtag preceded by full-width space (U+3000)"
122 text: "text #hashtag"
123 expected: "text <a href=\"http://twitter.com/search?q=%23hashtag\" title=\"#hashtag\" class=\"tweet-url hashtag\">#hashtag</a>"
124
125 - description: "Autolink hashtag followed by full-width space (U+3000)"
126 text: "#hashtag text"
127 expected: "<a href=\"http://twitter.com/search?q=%23hashtag\" title=\"#hashtag\" class=\"tweet-url hashtag\">#hashtag</a> text"
128
129 - description: "Autolink hashtag with full-width hash (U+FF03)"
130 text: "#hashtag"
131 expected: "<a href=\"http://twitter.com/search?q=%23hashtag\" title=\"#hashtag\" class=\"tweet-url hashtag\">#hashtag</a>"
132
ba63a8a Remove trailing spaces. Re-order autolink conformance data
Matt Sanford authored
133 urls:
134 - description: "Autolink trailing url"
135 text: "text http://example.com"
136 expected: "text <a href=\"http://example.com\">http://example.com</a>"
7f54f4c Fill in some URL autolinking from the Ruby specs
Matt Sanford authored
137
138 - description: "Autolink url in mid-text"
139 text: "text http://example.com more text"
140 expected: "text <a href=\"http://example.com\">http://example.com</a> more text"
141
142 - description: "Autolink url in Japanese text"
143 text: "いまなにしてるhttp://example.comいまなにしてる"
144 expected: "いまなにしてる<a href=\"http://example.com\">http://example.com</a>いまなにしてる"
145
146 - description: "Autolink url surrounded by parentheses"
147 text: "text (http://example.com)"
8e20dfb @hoverbird Fixing quotes in new conformance test
hoverbird authored
148 expected: "text (<a href=\"http://example.com\">http://example.com</a>)"
ba87602 @hoverbird Allow unicode characters in domains and colons preceding urls
hoverbird authored
149
85bb047 @hoverbird Remove conformance spec prohibiting URLs preceded by a colon
hoverbird authored
150 - description: "Autolink url containing unicode characters"
ba87602 @hoverbird Allow unicode characters in domains and colons preceding urls
hoverbird authored
151 text: "I enjoy Macintosh Brand computers: http://✪df.ws/ejp"
8e20dfb @hoverbird Fixing quotes in new conformance test
hoverbird authored
152 expected: "I enjoy Macintosh Brand computers: <a href=\"http://✪df.ws/ejp\">http://✪df.ws/ejp</a>"
ba87602 @hoverbird Allow unicode characters in domains and colons preceding urls
hoverbird authored
153
f6dafb5 Add more edge case testing for pinctuation in domains
Matt Sanford authored
154 - description: "DO NOT Autolink url containing ! character in the domain"
155 text: "badly formatted http://foo!bar.com"
156 expected: "badly formatted http://foo!bar.com"
157
158 - description: "DO NOT Autolink url containing _ character in the domain"
159 text: "badly formatted http://foo_bar.com"
160 expected: "badly formatted http://foo_bar.com"
161
ba87602 @hoverbird Allow unicode characters in domains and colons preceding urls
hoverbird authored
162 - description: "Autolink url preceded by :"
163 text: "text:http://example.com"
164 expected: "text:<a href=\"http://example.com\">http://example.com</a>"
7f54f4c Fill in some URL autolinking from the Ruby specs
Matt Sanford authored
165
166 - description: "Autolink url followed by ? (without it)"
167 text: "text http://example.com?"
168 expected: "text <a href=\"http://example.com\">http://example.com</a>?"
169
170 - description: "Autolink url followed by ! (without it)"
171 text: "text http://example.com!"
172 expected: "text <a href=\"http://example.com\">http://example.com</a>!"
173
174 - description: "Autolink url followed by , (without it)"
175 text: "text http://example.com,"
176 expected: "text <a href=\"http://example.com\">http://example.com</a>,"
177
178 - description: "Autolink url followed by . (without it)"
179 text: "text http://example.com."
180 expected: "text <a href=\"http://example.com\">http://example.com</a>."
181
182 - description: "Autolink url followed by : (without it)"
183 text: "text http://example.com:"
184 expected: "text <a href=\"http://example.com\">http://example.com</a>:"
185
186 - description: "Autolink url followed by ; (without it)"
187 text: "text http://example.com;"
188 expected: "text <a href=\"http://example.com\">http://example.com</a>;"
189
190 - description: "Autolink url followed by ] (without it)"
191 text: "text http://example.com]"
192 expected: "text <a href=\"http://example.com\">http://example.com</a>]"
193
194 - description: "Autolink url followed by ) (without it)"
195 text: "text http://example.com)"
196 expected: "text <a href=\"http://example.com\">http://example.com</a>)"
197
198 - description: "Autolink url followed by } (without it)"
199 text: "text http://example.com}"
200 expected: "text <a href=\"http://example.com\">http://example.com</a>}"
201
202 - description: "Autolink url followed by = (without it)"
203 text: "text http://example.com="
204 expected: "text <a href=\"http://example.com\">http://example.com</a>="
205
206 - description: "Autolink url followed by ' (without it)"
207 text: "text http://example.com'"
208 expected: "text <a href=\"http://example.com\">http://example.com</a>'"
209
210 - description: "DO NOT Autolink url preceded by '"
211 text: "text 'http://example.com"
212 expected: "text 'http://example.com"
213
214 - description: "DO NOT Autolink url preceded by /"
215 text: "text /http://example.com"
216 expected: "text /http://example.com"
217
218 - description: "DO NOT Autolink url preceded by !"
219 text: "text !http://example.com"
220 expected: "text !http://example.com"
221
222 - description: "DO NOT Autolink url preceded by ="
223 text: "text =http://example.com"
224 expected: "text =http://example.com"
225
226 - description: "Autolink url embedded in link tag"
227 text: "<link rel='true'>http://example.com</link>"
228 expected: "<link rel='true'><a href=\"http://example.com\">http://example.com</a></link>"
229
230 - description: "Autolink multiple urls"
231 text: "http://example.com https://sslexample.com http://sub.example.com"
4c437bc Remove invalid test case
Matt Sanford authored
232 expected: "<a href=\"http://example.com\">http://example.com</a> <a href=\"https://sslexample.com\">https://sslexample.com</a> <a href=\"http://sub.example.com\">http://sub.example.com</a>"
7f54f4c Fill in some URL autolinking from the Ruby specs
Matt Sanford authored
233
234 - description: "Autolink url with long TLD"
235 text: "http://example.mobi/path"
236 expected: "<a href=\"http://example.mobi/path\">http://example.mobi/path</a>"
237
238 - description: "Autolink url without protocol (with www)"
239 text: "www.example.com"
240 expected: "<a href=\"http://www.example.com\">www.example.com</a>"
8e920e6 Add case sensitivity test for link without protocol
Matt Sanford authored
241
242 - description: "Autolink url without protocol (with WWW)"
243 text: "WWW.EXAMPLE.COM"
244 expected: "<a href=\"http://WWW.EXAMPLE.COM\">WWW.EXAMPLE.COM</a>"
b5f7f2d Add a new conformance tests for http://domain.tld/path&@username
Matt Sanford authored
245
0aeb418 Add a test for two valid domains divided by a space
Matt Sanford authored
246 - description: "Autolink raw domain followed by domain"
247 text: "See http://example.com example.com"
248 expected: "See <a href=\"http://example.com\">http://example.com</a> example.com"
249
b5f7f2d Add a new conformance tests for http://domain.tld/path&@username
Matt Sanford authored
250 all:
251 - description: "Autolink url does not overlap @username"
252 text: "Check out: http://example.com/test&@chasesechrist"
253 expected: "Check out: <a href=\"http://example.com/test&\">http://example.com/test&</a>@<a class=\"tweet-url username\" href=\"http://twitter.com/chasesechrist\">chasesechrist</a>"
254
Something went wrong with that request. Please try again.