Add test for Debug formatting of char
This commit is contained in:
parent
4694d20170
commit
699a2b5c7e
@ -186,6 +186,14 @@ fn test_escape_debug() {
|
||||
assert_eq!(string('\u{100000}'), "\\u{100000}"); // private use 2
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_debug() {
|
||||
assert_eq!(format!("{:?}", 'a'), "'a'"); // ASCII character
|
||||
assert_eq!(format!("{:?}", 'é'), "'é'"); // printable character
|
||||
assert_eq!(format!("{:?}", '\u{301}'), "'\\u{301}'"); // combining character
|
||||
assert_eq!(format!("{:?}", '\u{e000}'), "'\\u{e000}'"); // private use 1
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_escape_default() {
|
||||
fn string(c: char) -> String {
|
||||
|
Loading…
x
Reference in New Issue
Block a user