@@ -6,6 +6,12 @@ fn escape_body_text_with_wbr() {
6
6
assert_eq ! ( & E ( "" ) . to_string( ) , "" ) ;
7
7
assert_eq ! ( & E ( "a" ) . to_string( ) , "a" ) ;
8
8
assert_eq ! ( & E ( "A" ) . to_string( ) , "A" ) ;
9
+ assert_eq ! ( & E ( "_" ) . to_string( ) , "_" ) ;
10
+ assert_eq ! ( & E ( ":" ) . to_string( ) , ":" ) ;
11
+ assert_eq ! ( & E ( " " ) . to_string( ) , " " ) ;
12
+ assert_eq ! ( & E ( "___________" ) . to_string( ) , "___________" ) ;
13
+ assert_eq ! ( & E ( ":::::::::::" ) . to_string( ) , ":::::::::::" ) ;
14
+ assert_eq ! ( & E ( " " ) . to_string( ) , " " ) ;
9
15
// real(istic) examples
10
16
assert_eq ! ( & E ( "FirstSecond" ) . to_string( ) , "First<wbr>Second" ) ;
11
17
assert_eq ! ( & E ( "First_Second" ) . to_string( ) , "First<wbr>_Second" ) ;
@@ -15,8 +21,9 @@ fn escape_body_text_with_wbr() {
15
21
assert_eq ! ( & E ( "First SecondThird" ) . to_string( ) , "First Second<wbr>Third" ) ;
16
22
assert_eq ! ( & E ( "First<T>_Second" ) . to_string( ) , "First<<wbr>T><wbr>_Second" ) ;
17
23
assert_eq ! ( & E ( "first_second" ) . to_string( ) , "first<wbr>_second" ) ;
24
+ assert_eq ! ( & E ( "first:second" ) . to_string( ) , "first:<wbr>second" ) ;
25
+ assert_eq ! ( & E ( "first::second" ) . to_string( ) , "first::<wbr>second" ) ;
18
26
assert_eq ! ( & E ( "MY_CONSTANT" ) . to_string( ) , "MY<wbr>_CONSTANT" ) ;
19
- assert_eq ! ( & E ( "___________" ) . to_string( ) , "___________" ) ;
20
27
// a string won't get wrapped if it's less than 8 bytes
21
28
assert_eq ! ( & E ( "HashSet" ) . to_string( ) , "HashSet" ) ;
22
29
// an individual word won't get wrapped if it's less than 4 bytes
0 commit comments