Skip to content

Commit b9abc54

Browse files
committed
---
yaml --- r: 90109 b: refs/heads/master c: 6488324 h: refs/heads/master i: 90107: 424e845 v: v3
1 parent d36660f commit b9abc54

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 7b96f13d7d046a5f625af73765515715a270757e
2+
refs/heads/master: 64883242ebece291170d86483cb1b3656ddc3d23
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/src/libstd/ascii.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,15 @@ mod tests {
498498
assert_eq!('`'.to_ascii().to_upper().to_char(), '`');
499499
assert_eq!('{'.to_ascii().to_upper().to_char(), '{');
500500

501+
assert!('0'.to_ascii().is_digit());
502+
assert!('9'.to_ascii().is_digit());
503+
assert!(!'/'.to_ascii().is_digit());
504+
assert!(!':'.to_ascii().is_digit());
505+
506+
assert!((0x1fu8).to_ascii().is_control());
507+
assert!(!' '.to_ascii().is_control());
508+
assert!((0x7fu8).to_ascii().is_control());
509+
501510
assert!("banana".chars().all(|c| c.is_ascii()));
502511
assert!(!"ประเทศไทย中华Việt Nam".chars().all(|c| c.is_ascii()));
503512
}

0 commit comments

Comments
 (0)