File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
25
25
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26
26
refs/heads/beta: c8bab9d06a179028a0d5129aa62f09d694d9cc49
27
27
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28
- refs/heads/tmp: 304f5452749b139f518baf6fa6160b66af654223
28
+ refs/heads/tmp: 90d61d828f82a830b9edc202dd28bb5b4defc7e9
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
30
30
refs/tags/homu-tmp: 1b28ffa5216c845d1cef6b0cb3e5ac7db12025d0
31
31
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
Original file line number Diff line number Diff line change @@ -469,16 +469,19 @@ mod tests {
469
469
use char:: from_u32;
470
470
471
471
#[ test]
472
- fn test_ascii ( ) {
473
- assert ! ( "banana" . chars( ) . all( |c| c. is_ascii( ) ) ) ;
474
- assert ! ( !"ประเทศไทย中华Việt Nam" . chars( ) . all( |c| c. is_ascii( ) ) ) ;
475
- }
472
+ fn test_is_ascii ( ) {
473
+ assert ! ( b"" . is_ascii( ) ) ;
474
+ assert ! ( b"banana\0 \x7F " . is_ascii( ) ) ;
475
+ assert ! ( b"banana\0 \x7F " . iter( ) . all( |b| b. is_ascii( ) ) ) ;
476
+ assert ! ( !b"Vi\xe1 \xbb \x87 t Nam" . is_ascii( ) ) ;
477
+ assert ! ( !b"Vi\xe1 \xbb \x87 t Nam" . iter( ) . all( |b| b. is_ascii( ) ) ) ;
478
+ assert ! ( !b"\xe1 \xbb \x87 " . iter( ) . any( |b| b. is_ascii( ) ) ) ;
476
479
477
- #[ test]
478
- fn test_ascii_vec ( ) {
479
480
assert ! ( "" . is_ascii( ) ) ;
480
- assert ! ( "a" . is_ascii( ) ) ;
481
- assert ! ( !"\u{2009} " . is_ascii( ) ) ;
481
+ assert ! ( "banana\0 \u{7F} " . is_ascii( ) ) ;
482
+ assert ! ( "banana\0 \u{7F} " . chars( ) . all( |c| c. is_ascii( ) ) ) ;
483
+ assert ! ( !"ประเทศไทย中华Việt Nam" . chars( ) . all( |c| c. is_ascii( ) ) ) ;
484
+ assert ! ( !"ประเทศไทย中华ệ " . chars( ) . any( |c| c. is_ascii( ) ) ) ;
482
485
}
483
486
484
487
#[ test]
You can’t perform that action at this time.
0 commit comments