提交 699a2b5c 编写于 作者: V varkor

Add test for Debug formatting of char

上级 4694d201
......@@ -186,6 +186,14 @@ fn string(c: char) -> String {
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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册