@@ -75,6 +75,8 @@ fn test_to_lowercase() {
75
75
assert_eq ! ( lower( 'Μ' ) , 'μ' ) ;
76
76
assert_eq ! ( lower( 'Α' ) , 'α' ) ;
77
77
assert_eq ! ( lower( 'Σ' ) , 'σ' ) ;
78
+ assert_eq ! ( lower( 'Dž' ) , 'dž' ) ;
79
+ assert_eq ! ( lower( 'fi' ) , 'fi' ) ;
78
80
}
79
81
80
82
#[ test]
@@ -95,6 +97,32 @@ fn test_to_uppercase() {
95
97
assert_eq ! ( upper( 'μ' ) , [ 'Μ' ] ) ;
96
98
assert_eq ! ( upper( 'α' ) , [ 'Α' ] ) ;
97
99
assert_eq ! ( upper( 'ς' ) , [ 'Σ' ] ) ;
100
+ assert_eq ! ( upper( 'Dž' ) , [ 'DŽ' ] ) ;
101
+ assert_eq ! ( upper( 'fi' ) , [ 'F' , 'I' ] ) ;
102
+ assert_eq ! ( upper( 'ᾀ' ) , [ 'Ἀ' , 'Ι' ] ) ;
103
+ }
104
+
105
+ #[ test]
106
+ fn test_to_titlecase ( ) {
107
+ fn title ( c : char ) -> Vec < char > {
108
+ c. to_titlecase ( ) . collect ( )
109
+ }
110
+ assert_eq ! ( title( 'a' ) , [ 'A' ] ) ;
111
+ assert_eq ! ( title( 'ö' ) , [ 'Ö' ] ) ;
112
+ assert_eq ! ( title( 'ß' ) , [ 'S' , 's' ] ) ; // not ẞ: Latin capital letter sharp s
113
+ assert_eq ! ( title( 'ü' ) , [ 'Ü' ] ) ;
114
+ assert_eq ! ( title( '💩' ) , [ '💩' ] ) ;
115
+
116
+ assert_eq ! ( title( 'σ' ) , [ 'Σ' ] ) ;
117
+ assert_eq ! ( title( 'τ' ) , [ 'Τ' ] ) ;
118
+ assert_eq ! ( title( 'ι' ) , [ 'Ι' ] ) ;
119
+ assert_eq ! ( title( 'γ' ) , [ 'Γ' ] ) ;
120
+ assert_eq ! ( title( 'μ' ) , [ 'Μ' ] ) ;
121
+ assert_eq ! ( title( 'α' ) , [ 'Α' ] ) ;
122
+ assert_eq ! ( title( 'ς' ) , [ 'Σ' ] ) ;
123
+ assert_eq ! ( title( 'DŽ' ) , [ 'Dž' ] ) ;
124
+ assert_eq ! ( title( 'fi' ) , [ 'F' , 'i' ] ) ;
125
+ assert_eq ! ( title( 'ᾀ' ) , [ 'ᾈ' ] ) ;
98
126
}
99
127
100
128
#[ test]
0 commit comments