@@ -43,20 +43,20 @@ public void testToHTML_WithoutNewlines() {
43
43
public void testToHTML_WithNewlinesOnly () {
44
44
String s = "This text has\n a newline character" ;
45
45
String html = HTMLUtilities .toHTML (s );
46
- assertEquals (HTML + "This text has<BR >\n a newline character" , html );
46
+ assertEquals (HTML + "This text has<br >\n a newline character" , html );
47
47
}
48
48
49
49
@ Test
50
50
public void testToHTML_WithBrTagsOnly () {
51
- String s = "This text has<BR >an existing BR tag" ;
51
+ String s = "This text has<br >an existing BR tag" ;
52
52
String html = HTMLUtilities .toHTML (s );
53
53
assertEquals (HTML + s , html );
54
54
spyLogger .assertLogMessage ("cannot" , "wrap" );
55
55
}
56
56
57
57
@ Test
58
58
public void testToHTML_WithNewlinesAndBrTags () {
59
- String s = "This text has<BR >\n an existing BR tag and a newline" ;
59
+ String s = "This text has<br >\n an existing BR tag and a newline" ;
60
60
String html = HTMLUtilities .toHTML (s );
61
61
assertEquals (HTML + s , html );
62
62
spyLogger .assertLogMessage ("cannot" , "wrap" );
@@ -68,7 +68,7 @@ public void testToWrappedHTML_DefaultWrapLimit() {
68
68
"This is a line that is longer than the default line limit of seventy-five characters" ;
69
69
String html = HTMLUtilities .toWrappedHTML (s );
70
70
assertEquals (HTML +
71
- "This is a line that is longer than the default line limit of seventy-five<BR >\n " +
71
+ "This is a line that is longer than the default line limit of seventy-five<br >\n " +
72
72
"characters" , html );
73
73
}
74
74
@@ -77,14 +77,14 @@ public void testToWrappedHTML_MultipleNewlines_NoLimit() {
77
77
// note: toWrappedHTML preserves whitespace
78
78
String s = "Wrap\n \n here\n \n \n " ;
79
79
String html = HTMLUtilities .toWrappedHTML (s , 0 );
80
- assertEquals (HTML + "Wrap<BR >\n <BR >\n here<BR >\n <BR >\n <BR >\n " , html );
80
+ assertEquals (HTML + "Wrap<br >\n <br >\n here<br >\n <br >\n <br >\n " , html );
81
81
}
82
82
83
83
@ Test
84
84
public void testToWrappedHTML_SpecifiedWrapLimit () {
85
85
String s = "Wrap here" ;
86
86
String html = HTMLUtilities .toWrappedHTML (s , 4 );
87
- assertEquals (HTML + "Wrap<BR >\n here" , html );
87
+ assertEquals (HTML + "Wrap<br >\n here" , html );
88
88
}
89
89
90
90
@ Test
@@ -107,16 +107,16 @@ public void testToLiteralHTML() {
107
107
108
108
@ Test
109
109
public void testToLiteralHTML_AlreadyStartingWithHTML () {
110
- String s = "<html>Wrap<BR >here" ;
110
+ String s = "<html>Wrap<br >here" ;
111
111
String html = HTMLUtilities .toLiteralHTML (s , 4 );
112
- assertEquals (HTML + "<HTM<BR> \n L >Wr<BR >\n ap<B<BR> \n R >he<BR >\n re" , html );
112
+ assertEquals (HTML + "<htm<br> \n l >Wr<br >\n ap<b<br> \n r >he<br >\n re" , html );
113
113
}
114
114
115
115
@ Test
116
116
public void testToLiteralHTML_NoExisingHTML_SpecifiedLimit () {
117
117
String s = "Wrap here" ;
118
118
String html = HTMLUtilities .toLiteralHTML (s , 4 );
119
- assertEquals (HTML + "Wrap<BR >\n <BR >\n here" , html );
119
+ assertEquals (HTML + "Wrap<br >\n <br >\n here" , html );
120
120
}
121
121
122
122
@ Test
@@ -143,23 +143,23 @@ public void testLinkPlaceholder() {
143
143
String placeholderStr =
144
144
HTMLUtilities .wrapWithLinkPlaceholder ("Stuff inside link tag" , "targetstr" );
145
145
String htmlStr = HTMLUtilities .convertLinkPlaceholdersToHyperlinks (placeholderStr );
146
- assertEquals ("<A HREF =\" targetstr\" >Stuff inside link tag</A >" , htmlStr );
146
+ assertEquals ("<a href =\" targetstr\" >Stuff inside link tag</a >" , htmlStr );
147
147
}
148
148
149
149
@ Test
150
150
public void testLinkPlaceholder_Regex_backrefs () {
151
151
String placeholderStr =
152
152
HTMLUtilities .wrapWithLinkPlaceholder ("Stuff inside link tag" , "test$1" );
153
153
String htmlStr = HTMLUtilities .convertLinkPlaceholdersToHyperlinks (placeholderStr );
154
- assertEquals ("<A HREF =\" test$1\" >Stuff inside link tag</A >" , htmlStr );
154
+ assertEquals ("<a href =\" test$1\" >Stuff inside link tag</a >" , htmlStr );
155
155
}
156
156
157
157
@ Test
158
158
public void testLinkPlaceholder_htmlchars () {
159
159
String placeholderStr =
160
160
HTMLUtilities .wrapWithLinkPlaceholder ("Stuff inside <b>link</b> tag" , "test" );
161
161
String htmlStr = HTMLUtilities .convertLinkPlaceholdersToHyperlinks (placeholderStr );
162
- assertEquals ("<A HREF =\" test\" >Stuff inside <b>link</b> tag</A >" , htmlStr );
162
+ assertEquals ("<a href =\" test\" >Stuff inside <b>link</b> tag</a >" , htmlStr );
163
163
}
164
164
165
165
@ Test
0 commit comments