2019-07-26 21:54:25 +00:00
|
|
|
|
//@ run-pass
|
2014-02-07 19:08:32 +00:00
|
|
|
|
// ignore-tidy-tab
|
|
|
|
|
// ignore-tidy-linelength
|
2014-02-05 22:33:10 +00:00
|
|
|
|
|
2013-10-02 00:43:19 +00:00
|
|
|
|
pub fn main() {
|
|
|
|
|
assert_eq!(r"abc", "abc");
|
|
|
|
|
|
|
|
|
|
assert_eq!(r#"abc"#, "abc");
|
|
|
|
|
|
|
|
|
|
assert_eq!(r"###", "###");
|
|
|
|
|
|
|
|
|
|
assert_eq!(r"\", "\\");
|
|
|
|
|
|
|
|
|
|
assert_eq!(r#"\""#, "\\\"");
|
|
|
|
|
|
|
|
|
|
assert_eq!(r#"#"\n""#, "#\"\\n\"");
|
|
|
|
|
|
|
|
|
|
assert_eq!(r##"a"#"b"##, "a\"#\"b");
|
|
|
|
|
|
|
|
|
|
// from rust.vim
|
|
|
|
|
assert_eq!(r#""%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn?]\|\[\^\=.[^]]*\]\)""#,
|
|
|
|
|
"\"%\\(\\d\\+\\$\\)\\=[-+' #0*]*\\(\\d*\\|\\*\\|\\*\\d\\+\\$\\)\\(\\.\\(\\d*\\|\\*\\|\\*\\d\\+\\$\\)\\)\\=\\([hlLjzt]\\|ll\\|hh\\)\\=\\([aAbdiuoxXDOUfFeEgGcCsSpn?]\\|\\[\\^\\=.[^]]*\\]\\)\"");
|
|
|
|
|
|
|
|
|
|
assert_eq!(r"newline:'
|
|
|
|
|
', tab:' ', unicode:'●', null:' |