Test escape handling in gnu_units

This commit is contained in:
Colin Benner 2018-10-01 11:31:06 +02:00
parent 999f59bc78
commit 30fcab3528

View file

@ -597,7 +597,17 @@ mod tests {
Expr::Error,
"Expected term, got Error(\"Expected LF or CRLF line endings\")"
);
expect!("\\\r\n1", Expr::Const, 1.into());
expect!("\\\r\n1", Expr::Const, 1.into())
expect!(
"\\a",
Expr::Error,
"Expected term, got Error(\"Invalid escape: \\\\a\")"
);
expect!(
"\\",
Expr::Error,
"Expected term, got Error(\"Unexpected EOF\")"
);
}
}