@@ -201,7 +201,7 @@ mod test {
201201 assert ! (
202202 are_all_variants_valid(
203203 SYM ,
204- |c| !c. ends_with ( EMOJI_PRESENTATION_SELECTOR ) ,
204+ |c| !c. contains ( EMOJI_PRESENTATION_SELECTOR ) ,
205205 ) ,
206206 "unexpected use of emoji presentation selector (U+FE0F) in `sym` (see list above)" ,
207207 )
@@ -212,7 +212,7 @@ mod test {
212212 assert ! (
213213 are_all_variants_valid(
214214 EMOJI ,
215- |c| !c. ends_with ( TEXT_PRESENTATION_SELECTOR ) ,
215+ |c| !c. contains ( TEXT_PRESENTATION_SELECTOR ) ,
216216 ) ,
217217 "unexpected use of text presentation selector (U+FE0E) in `emoji` (see list above)" ,
218218 )
@@ -248,8 +248,8 @@ mod test {
248248 let sequences = get_valid_presentation_sequences ( ) ;
249249 assert ! (
250250 are_all_variants_valid( ROOT , |c| {
251- if c. ends_with ( TEXT_PRESENTATION_SELECTOR )
252- || c. ends_with ( EMOJI_PRESENTATION_SELECTOR )
251+ if c. contains ( TEXT_PRESENTATION_SELECTOR )
252+ || c. contains ( EMOJI_PRESENTATION_SELECTOR )
253253 {
254254 sequences. contains( c)
255255 } else {
@@ -269,8 +269,8 @@ mod test {
269269 . collect :: < HashSet < _ > > ( ) ;
270270 assert ! (
271271 are_all_variants_valid( SYM , |c| {
272- c. chars( ) . count( ) ! = 1
273- || ! require_presentation_selector. contains( & c. chars( ) . next( ) . unwrap( ) )
272+ ! ( c. chars( ) . count( ) = = 1
273+ && require_presentation_selector. contains( & c. chars( ) . next( ) . unwrap( ) ) )
274274 } ) ,
275275 "missing text presentation selector(s) (U+FE0E) in `sym` (see list above)" ,
276276 )
@@ -285,8 +285,8 @@ mod test {
285285 . collect :: < HashSet < _ > > ( ) ;
286286 assert ! (
287287 are_all_variants_valid( EMOJI , |c| {
288- c. chars( ) . count( ) ! = 1
289- || ! require_presentation_selector. contains( & c. chars( ) . next( ) . unwrap( ) )
288+ ! ( c. chars( ) . count( ) = = 1
289+ && require_presentation_selector. contains( & c. chars( ) . next( ) . unwrap( ) ) )
290290 } ) ,
291291 "missing emoji presentation selector(s) (U+FE0F) in `emoji` (see list above)" ,
292292 )
0 commit comments