mirror of
https://github.com/casey/just.git
synced 2024-11-26 11:43:43 +03:00
Test unpaired escaped carriage return error (#1650)
This commit is contained in:
parent
30bcf28fde
commit
53d5f004df
@ -47,13 +47,13 @@ fn newline_escape_deps_linefeed() {
|
||||
Test::new()
|
||||
.justfile(
|
||||
"
|
||||
default: a\\\r
|
||||
b
|
||||
a:
|
||||
echo a
|
||||
b:
|
||||
echo b
|
||||
",
|
||||
default: a\\\r
|
||||
b
|
||||
a:
|
||||
echo a
|
||||
b:
|
||||
echo b
|
||||
",
|
||||
)
|
||||
.stdout("a\nb\n")
|
||||
.stderr("echo a\necho b\n")
|
||||
@ -70,7 +70,32 @@ fn newline_escape_deps_invalid_esc() {
|
||||
)
|
||||
.stdout("")
|
||||
.stderr(
|
||||
"error: `\\ ` is not a valid escape sequence\n |\n1 | default: a\\ b\n | ^\n",
|
||||
"
|
||||
error: `\\ ` is not a valid escape sequence
|
||||
|
|
||||
1 | default: a\\ b
|
||||
| ^
|
||||
",
|
||||
)
|
||||
.status(EXIT_FAILURE)
|
||||
.run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn newline_escape_unpaired_linefeed() {
|
||||
Test::new()
|
||||
.justfile(
|
||||
"
|
||||
default:\\\ra",
|
||||
)
|
||||
.stdout("")
|
||||
.stderr(
|
||||
"
|
||||
error: Unpaired carriage return
|
||||
|
|
||||
1 | default:\\\ra
|
||||
| ^
|
||||
",
|
||||
)
|
||||
.status(EXIT_FAILURE)
|
||||
.run();
|
||||
|
Loading…
Reference in New Issue
Block a user