diff options
Diffstat (limited to 'src/parse/test.rs')
| -rw-r--r-- | src/parse/test.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/parse/test.rs b/src/parse/test.rs index 3058730..91a3fda 100644 --- a/src/parse/test.rs +++ b/src/parse/test.rs @@ -329,3 +329,16 @@ fn dollar_non_var() { pipes([cmd([estr(b"echo"), estr(b"$_")]),]) ) } + +#[test] +fn backslash_eof() { + assert_eq!(do_parse(b"echo \\").unwrap_err().0, ParseError::Eof); +} + +#[test] +fn backslash_joins_lines() { + parse_test!( + parse(b"echo \\\nhello"), + pipes([cmd([estr(b"echo"), estr(b"hello")]),]) + ) +} |
