File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed
src/test/java/org/nibor/autolink Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,18 @@ public void triggerOverlap() {
122
122
assertLinked ("www@example.com" , "|www@example.com|" );
123
123
}
124
124
125
+ @ Test
126
+ public void replyLevel () {
127
+ assertLinked (">foo@example.com" , ">|foo@example.com|" );
128
+ assertLinked ("> foo@example.com" , "> |foo@example.com|" );
129
+ assertLinked (">>foo@example.com" , ">>|foo@example.com|" );
130
+ assertLinked (">> foo@example.com" , ">> |foo@example.com|" );
131
+ assertLinked ("> > foo@example.com" , "> > |foo@example.com|" );
132
+ assertLinked (">>>foo@example.com" , ">>>|foo@example.com|" );
133
+ assertLinked (">>> foo@example.com" , ">>> |foo@example.com|" );
134
+ assertLinked ("> > > foo@example.com" , "> > > |foo@example.com|" );
135
+ }
136
+
125
137
@ Override
126
138
protected LinkExtractor getLinkExtractor () {
127
139
return linkExtractor ;
Original file line number Diff line number Diff line change @@ -184,6 +184,18 @@ public void international() {
184
184
assertLinked ("http://example.org/\u00A2 " , "|http://example.org/\u00A2 |" );
185
185
}
186
186
187
+ @ Test
188
+ public void replyLevel () {
189
+ assertLinked (">http://example.org/" , ">|http://example.org/|" );
190
+ assertLinked ("> http://example.org/" , "> |http://example.org/|" );
191
+ assertLinked (">>http://example.org/" , ">>|http://example.org/|" );
192
+ assertLinked (">> http://example.org/" , ">> |http://example.org/|" );
193
+ assertLinked ("> > http://example.org/" , "> > |http://example.org/|" );
194
+ assertLinked (">>>http://example.org/" , ">>>|http://example.org/|" );
195
+ assertLinked (">>> http://example.org/" , ">>> |http://example.org/|" );
196
+ assertLinked ("> > > http://example.org/" , "> > > |http://example.org/|" );
197
+ }
198
+
187
199
@ Test
188
200
public void linkToString () {
189
201
Iterable <LinkSpan > links = getLinkExtractor ().extractLinks ("wow, so example: http://test.com" );
Original file line number Diff line number Diff line change @@ -68,6 +68,18 @@ public void international() {
68
68
assertLinked ("www.example.org/\u00A2 " , "|www.example.org/\u00A2 |" );
69
69
}
70
70
71
+ @ Test
72
+ public void replyLevel () {
73
+ assertLinked (">www.example.org/" , ">|www.example.org/|" );
74
+ assertLinked ("> www.example.org/" , "> |www.example.org/|" );
75
+ assertLinked (">>www.example.org/" , ">>|www.example.org/|" );
76
+ assertLinked (">> www.example.org/" , ">> |www.example.org/|" );
77
+ assertLinked ("> > www.example.org/" , "> > |www.example.org/|" );
78
+ assertLinked (">>>www.example.org/" , ">>>|www.example.org/|" );
79
+ assertLinked (">>> www.example.org/" , ">>> |www.example.org/|" );
80
+ assertLinked ("> > > www.example.org/" , "> > > |www.example.org/|" );
81
+ }
82
+
71
83
@ Override
72
84
protected LinkExtractor getLinkExtractor () {
73
85
return linkExtractor ;
You can’t perform that action at this time.
0 commit comments