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 1
1
---
2
2
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
3
3
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4
- refs/heads/try: 304f5452749b139f518baf6fa6160b66af654223
4
+ refs/heads/try: 90d61d828f82a830b9edc202dd28bb5b4defc7e9
5
5
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
6
6
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
7
7
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
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