summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasey Rodarmor <casey@rodarmor.com>2023-12-29 13:25:30 -0800
committerGitHub <noreply@github.com>2023-12-29 21:25:30 +0000
commitb188882ed0ab81ce7ae85bd184c298b2a801af4e (patch)
treed710e6ca59406b27995ec1d61295c485140b1406
parente2c0d86bdd3fe7e66195e99d1c0de0eed624be56 (diff)
Use box-drawing characters in error messages (#1798)
-rw-r--r--src/lexer.rs8
-rw-r--r--src/token.rs8
-rw-r--r--tests/attributes.rs24
-rw-r--r--tests/byte_order_mark.rs16
-rw-r--r--tests/conditional.rs56
-rw-r--r--tests/delimiters.rs24
-rw-r--r--tests/error_messages.rs57
-rw-r--r--tests/fallback.rs8
-rw-r--r--tests/functions.rs88
-rw-r--r--tests/imports.rs16
-rw-r--r--tests/misc.rs418
-rw-r--r--tests/modules.rs48
-rw-r--r--tests/newline_escape.rs16
-rw-r--r--tests/no_exit_message.rs26
-rw-r--r--tests/recursion_limit.rs16
-rw-r--r--tests/show.rs8
-rw-r--r--tests/slash_operator.rs24
-rw-r--r--tests/string.rs88
-rw-r--r--tests/subsequents.rs24
-rw-r--r--tests/undefined_variables.rs40
20 files changed, 506 insertions, 507 deletions
diff --git a/src/lexer.rs b/src/lexer.rs
index 1072698a..ad8cee4e 100644
--- a/src/lexer.rs
+++ b/src/lexer.rs
@@ -2311,10 +2311,10 @@ mod tests {
.to_string(),
"error: Internal error, this may indicate a bug in just: Lexer presumed character `-`
consider filing an issue: https://github.com/casey/just/issues/new
- --> justfile:1:1
- |
-1 | !
- | ^"
+ ——▶ justfile:1:1
+ │
+1 │ !
+ │ ^"
);
}
}
diff --git a/src/token.rs b/src/token.rs
index 9846236e..d8a7bf21 100644
--- a/src/token.rs
+++ b/src/token.rs
@@ -57,7 +57,7 @@ impl<'src> ColorDisplay for Token<'src> {
f,
"{:width$}{} {}:{}:{}",
"",
- color.context().paint("-->"),
+ color.context().paint("——▶"),
self.path.display(),
line_number,
self.column.ordinal(),
@@ -67,19 +67,19 @@ impl<'src> ColorDisplay for Token<'src> {
f,
"{:width$} {}",
"",
- color.context().paint("|"),
+ color.context().paint("│"),
width = line_number_width
)?;
writeln!(
f,
"{} {space_line}",
- color.context().paint(&format!("{line_number} |"))
+ color.context().paint(&format!("{line_number} │"))
)?;
write!(
f,
"{:width$} {}",
"",
- color.context().paint("|"),
+ color.context().paint("│"),
width = line_number_width
)?;
write!(
diff --git a/tests/attributes.rs b/tests/attributes.rs
index 8560e99b..605e7476 100644
--- a/tests/attributes.rs
+++ b/tests/attributes.rs
@@ -33,10 +33,10 @@ fn duplicate_attributes_are_disallowed() {
.stderr(
"
error: Recipe attribute `no-exit-message` first used on line 1 is duplicated on line 2
- --> justfile:2:2
- |
- 2 | [no-exit-message]
- | ^^^^^^^^^^^^^^^
+ ——▶ justfile:2:2
+ │
+ 2 │ [no-exit-message]
+ │ ^^^^^^^^^^^^^^^
",
)
.status(1)
@@ -73,10 +73,10 @@ fn multiple_attributes_one_line_error_message() {
.stderr(
"
error: Expected ']' or ',', but found identifier
- --> justfile:1:17
- |
- 1 | [macos, windows linux]
- | ^^^^^
+ ——▶ justfile:1:17
+ │
+ 1 │ [macos, windows linux]
+ │ ^^^^^
",
)
.status(1)
@@ -97,10 +97,10 @@ fn multiple_attributes_one_line_duplicate_check() {
.stderr(
"
error: Recipe attribute `linux` first used on line 1 is duplicated on line 2
- --> justfile:2:2
- |
- 2 | [linux]
- | ^^^^^
+ ——▶ justfile:2:2
+ │
+ 2 │ [linux]
+ │ ^^^^^
",
)
.status(1)
diff --git a/tests/byte_order_mark.rs b/tests/byte_order_mark.rs
index 2a45c06d..f4a867a6 100644
--- a/tests/byte_order_mark.rs
+++ b/tests/byte_order_mark.rs
@@ -27,10 +27,10 @@ fn non_leading_byte_order_mark_produces_error() {
.stderr(
"
error: Expected \'@\', \'[\', comment, end of file, end of line, or identifier, but found byte order mark
- --> justfile:3:1
- |
- 3 | \u{feff}
- | ^
+ ——▶ justfile:3:1
+ │
+ 3 │ \u{feff}
+ │ ^
")
.status(EXIT_FAILURE)
.run();
@@ -43,10 +43,10 @@ fn dont_mention_byte_order_mark_in_errors() {
.stderr(
"
error: Expected '@', '[', comment, end of file, end of line, or identifier, but found '{'
- --> justfile:1:1
- |
- 1 | {
- | ^
+ ——▶ justfile:1:1
+ │
+ 1 │ {
+ │ ^
",
)
.status(EXIT_FAILURE)
diff --git a/tests/conditional.rs b/tests/conditional.rs
index 359b033e..c1739240 100644
--- a/tests/conditional.rs
+++ b/tests/conditional.rs
@@ -61,10 +61,10 @@ test! {
stdout: "",
stderr: "
error: Variable `b` not defined
- --> justfile:1:9
- |
- 1 | a := if b == '' { '' } else { '' }
- | ^
+ ——▶ justfile:1:9
+ │
+ 1 │ a := if b == '' { '' } else { '' }
+ │ ^
",
status: EXIT_FAILURE,
}
@@ -80,10 +80,10 @@ test! {
stdout: "",
stderr: "
error: Variable `b` not defined
- --> justfile:1:15
- |
- 1 | a := if '' == b { '' } else { '' }
- | ^
+ ——▶ justfile:1:15
+ │
+ 1 │ a := if '' == b { '' } else { '' }
+ │ ^
",
status: EXIT_FAILURE,
}
@@ -99,10 +99,10 @@ test! {
stdout: "",
stderr: "
error: Variable `b` not defined
- --> justfile:1:20
- |
- 1 | a := if '' == '' { b } else { '' }
- | ^
+ ——▶ justfile:1:20
+ │
+ 1 │ a := if '' == '' { b } else { '' }
+ │ ^
",
status: EXIT_FAILURE,
}
@@ -118,10 +118,10 @@ test! {
stdout: "",
stderr: "
error: Variable `b` not defined
- --> justfile:1:32
- |
- 1 | a := if '' == '' { '' } else { b }
- | ^
+ ——▶ justfile:1:32
+ │
+ 1 │ a := if '' == '' { '' } else { b }
+ │ ^
",
status: EXIT_FAILURE,
}
@@ -137,10 +137,10 @@ test! {
stdout: "",
stderr: "
error: Expected '!=', '==', '=~', '+', or '/', but found identifier
- --> justfile:1:12
- |
- 1 | a := if '' a '' { '' } else { b }
- | ^
+ ——▶ justfile:1:12
+ │
+ 1 │ a := if '' a '' { '' } else { b }
+ │ ^
",
status: EXIT_FAILURE,
}
@@ -182,10 +182,10 @@ test! {
stdout: "",
stderr: "
error: Expected keyword `else` but found `end of line`
- --> justfile:1:54
- |
- 1 | TEST := if path_exists('/bin/bash') == 'true' {'yes'}
- | ^
+ ——▶ justfile:1:54
+ │
+ 1 │ TEST := if path_exists('/bin/bash') == 'true' {'yes'}
+ │ ^
",
status: EXIT_FAILURE,
}
@@ -198,10 +198,10 @@ test! {
stdout: "",
stderr: "
error: Expected keyword `else` but found identifier `els`
- --> justfile:1:55
- |
- 1 | TEST := if path_exists('/bin/bash') == 'true' {'yes'} els {'no'}
- | ^^^
+ ——▶ justfile:1:55
+ │
+ 1 │ TEST := if path_exists('/bin/bash') == 'true' {'yes'} els {'no'}
+ │ ^^^
",
status: EXIT_FAILURE,
}
diff --git a/tests/delimiters.rs b/tests/delimiters.rs
index 773fec4f..a0d9715c 100644
--- a/tests/delimiters.rs
+++ b/tests/delimiters.rs
@@ -5,10 +5,10 @@ test! {
justfile: "(]",
stderr: "
error: Mismatched closing delimiter `]`. (Did you mean to close the `(` on line 1?)
- --> justfile:1:2
- |
- 1 | (]
- | ^
+ ——▶ justfile:1:2
+ │
+ 1 │ (]
+ │ ^
",
status: EXIT_FAILURE,
}
@@ -18,10 +18,10 @@ test! {
justfile: "]",
stderr: "
error: Unexpected closing delimiter `]`
- --> justfile:1:1
- |
- 1 | ]
- | ^
+ ——▶ justfile:1:1
+ │
+ 1 │ ]
+ │ ^
",
status: EXIT_FAILURE,
}
@@ -98,10 +98,10 @@ test! {
stdout: "",
stderr: "
error: Unterminated interpolation
- --> justfile:2:8
- |
- 2 | echo {{ (
- | ^^
+ ——▶ justfile:2:8
+ │
+ 2 │ echo {{ (
+ │ ^^
",
status: EXIT_FAILURE,
}
diff --git a/tests/error_messages.rs b/tests/error_messages.rs
index 9d376d54..89b4fd1c 100644
--- a/tests/error_messages.rs
+++ b/tests/error_messages.rs
@@ -5,10 +5,10 @@ test! {
justfile: "[private]\n[linux]\nalias t := test\n\ntest:\n",
stderr: "
error: Alias t has an invalid attribute `linux`
- --> justfile:3:7
- |
- 3 | alias t := test
- | ^
+ ——▶ justfile:3:7
+ │
+ 3 │ alias t := test
+ │ ^
",
status: EXIT_FAILURE,
}
@@ -18,10 +18,10 @@ test! {
justfile: "foo := if '' == '' { '' } arlo { '' }",
stderr: "
error: Expected keyword `else` but found identifier `arlo`
- --> justfile:1:27
- |
- 1 | foo := if '' == '' { '' } arlo { '' }
- | ^^^^
+ ——▶ justfile:1:27
+ │
+ 1 │ foo := if '' == '' { '' } arlo { '' }
+ │ ^^^^
",
status: EXIT_FAILURE,
}
@@ -31,10 +31,10 @@ test! {
justfile: "&~",
stderr: "
error: Expected character `&`
- --> justfile:1:2
- |
- 1 | &~
- | ^
+ ——▶ justfile:1:2
+ │
+ 1 │ &~
+ │ ^
",
status: EXIT_FAILURE,
}
@@ -63,10 +63,10 @@ fn file_path_is_indented_if_justfile_is_long() {
.stderr(
"
error: Expected '*', ':', '$', identifier, or '+', but found end of file
- --> justfile:20:4
- |
-20 | foo
- | ^
+ ——▶ justfile:20:4
+ │
+20 │ foo
+ │ ^
",
)
.run();
@@ -81,10 +81,10 @@ fn file_paths_are_relative() {
.stderr(format!(
"
error: Expected '*', ':', '$', identifier, or '+', but found end of file
- --> foo{}bar.just:1:4
- |
-1 | baz
- | ^
+ ——▶ foo{}bar.just:1:4
+ │
+1 │ baz
+ │ ^
",
MAIN_SEPARATOR
))
@@ -92,6 +92,7 @@ error: Expected '*', ':', '$', identifier, or '+', but found end of file
}
#[test]
+#[cfg(not(windows))]
fn file_paths_not_in_subdir_are_absolute() {
Test::new()
.write("foo/justfile", "import '../bar.just'")
@@ -99,15 +100,13 @@ fn file_paths_not_in_subdir_are_absolute() {
.no_justfile()
.args(["--justfile", "foo/justfile"])
.status(EXIT_FAILURE)
- .stderr_regex(format!(
- "
-error: Expected '*', ':', '$', identifier, or '+', but found end of file
- --> {}.*{}bar.just:1:4
- |
-1 | baz
- | ^
+ .stderr_regex(
+ r"error: Expected '\*', ':', '\$', identifier, or '\+', but found end of file
+ ——▶ /.*/bar.just:1:4
+ │
+1 │ baz
+ │ \^
",
- MAIN_SEPARATOR, MAIN_SEPARATOR
- ))
+ )
.run();
}
diff --git a/tests/fallback.rs b/tests/fallback.rs
index d1a3da95..3330e17a 100644
--- a/tests/fallback.rs
+++ b/tests/fallback.rs
@@ -146,10 +146,10 @@ fn print_error_from_parent_if_recipe_not_found_in_current() {
.stderr(
"
error: Variable `bar` not defined
- --> justfile:2:9
- |
- 2 | echo {{bar}}
- | ^^^
+ ——▶ justfile:2:9
+ │
+ 2 │ echo {{bar}}
+ │ ^^^
",
)
.status(EXIT_FAILURE)
diff --git a/tests/functions.rs b/tests/functions.rs
index 993b99d2..53566158 100644
--- a/tests/functions.rs
+++ b/tests/functions.rs
@@ -88,10 +88,10 @@ foo:
stderr: format!("{} {}\n{}\n{}\n{}\n{}\n",
"error: Call to function `without_extension` failed:",
"Could not extract parent from ``",
- " --> justfile:1:8",
- " |",
- "1 | we := without_extension(\'\')",
- " | ^^^^^^^^^^^^^^^^^").as_str(),
+ " ——▶ justfile:1:8",
+ " │",
+ "1 │ we := without_extension(\'\')",
+ " │ ^^^^^^^^^^^^^^^^^").as_str(),
status: EXIT_FAILURE,
}
@@ -107,10 +107,10 @@ foo:
stdout: "",
stderr: format!("{}\n{}\n{}\n{}\n{}\n",
"error: Call to function `extension` failed: Could not extract extension from ``",
- " --> justfile:1:8",
- " |",
- "1 | we := extension(\'\')",
- " | ^^^^^^^^^").as_str(),
+ " ——▶ justfile:1:8",
+ " │",
+ "1 │ we := extension(\'\')",
+ " │ ^^^^^^^^^").as_str(),
status: EXIT_FAILURE,
}
@@ -126,10 +126,10 @@ foo:
stdout: "",
stderr: format!("{}\n{}\n{}\n{}\n{}\n",
"error: Call to function `extension` failed: Could not extract extension from `foo`",
- " --> justfile:1:8",
- " |",
- "1 | we := extension(\'foo\')",
- " | ^^^^^^^^^").as_str(),
+ " ——▶ justfile:1:8",
+ " │",
+ "1 │ we := extension(\'foo\')",
+ " │ ^^^^^^^^^").as_str(),
status: EXIT_FAILURE,
}
@@ -145,10 +145,10 @@ foo:
stdout: "",
stderr: format!("{}\n{}\n{}\n{}\n{}\n",
"error: Call to function `file_stem` failed: Could not extract file stem from ``",
- " --> justfile:1:8",
- " |",
- "1 | we := file_stem(\'\')",
- " | ^^^^^^^^^").as_str(),
+ " ——▶ justfile:1:8",
+ " │",
+ "1 │ we := file_stem(\'\')",
+ " │ ^^^^^^^^^").as_str(),
status: EXIT_FAILURE,
}
@@ -164,10 +164,10 @@ foo:
stdout: "",
stderr: format!("{}\n{}\n{}\n{}\n{}\n",
"error: Call to function `file_name` failed: Could not extract file name from ``",
- " --> justfile:1:8",
- " |",
- "1 | we := file_name(\'\')",
- " | ^^^^^^^^^").as_str(),
+ " ——▶ justfile:1:8",
+ " │",
+ "1 │ we := file_name(\'\')",
+ " │ ^^^^^^^^^").as_str(),
status: EXIT_FAILURE,
}
@@ -184,10 +184,10 @@ foo:
stderr: format!("{} {}\n{}\n{}\n{}\n{}\n",
"error: Call to function `parent_directory` failed:",
"Could not extract parent directory from ``",
- " --> justfile:1:8",
- " |",
- "1 | we := parent_directory(\'\')",
- " | ^^^^^^^^^^^^^^^^").as_str(),
+ " ——▶ justfile:1:8",
+ " │",
+ "1 │ we := parent_directory(\'\')",
+ " │ ^^^^^^^^^^^^^^^^").as_str(),
status: EXIT_FAILURE,
}
@@ -204,10 +204,10 @@ foo:
stderr: format!("{} {}\n{}\n{}\n{}\n{}\n",
"error: Call to function `parent_directory` failed:",
"Could not extract parent directory from `/`",
- " --> justfile:1:8",
- " |",
- "1 | we := parent_directory(\'/\')",
- " | ^^^^^^^^^^^^^^^^").as_str(),
+ " ——▶ justfile:1:8",
+ " │",
+ "1 │ we := parent_directory(\'/\')",
+ " │ ^^^^^^^^^^^^^^^^").as_str(),
status: EXIT_FAILURE,
}
@@ -232,10 +232,10 @@ test! {
args: ("a"),
stdout: "",
stderr: "error: Call to function `env_var` failed: environment variable `ZADDY` not present
- --> justfile:2:10
- |
-2 | echo {{env_var('ZADDY')}}
- | ^^^^^^^
+ ——▶ justfile:2:10
+ │
+2 │ echo {{env_var('ZADDY')}}
+ │ ^^^^^^^
",
status: EXIT_FAILURE,
}
@@ -403,10 +403,10 @@ test! {
foo\\
^
error: incomplete escape sequence, reached end of pattern prematurely
- --> justfile:2:11
- |
-2 | echo {{ replace_regex('barbarbar', 'foo\\', 'foo') }}
- | ^^^^^^^^^^^^^
+ ——▶ justfile:2:11
+ │
+2 │ echo {{ replace_regex('barbarbar', 'foo\\', 'foo') }}
+ │ ^^^^^^^^^^^^^
",
status: EXIT_FAILURE,
}
@@ -507,10 +507,10 @@ fn join_argument_count_error() {
.stderr(
"
error: Function `join` called with 1 argument but takes 2 or more
- --> justfile:1:6
- |
- 1 | x := join(\'a\')
- | ^^^^
+ ——▶ justfile:1:6
+ │
+ 1 │ x := join(\'a\')
+ │ ^^^^
",
)
.status(EXIT_FAILURE)
@@ -547,10 +547,10 @@ fn error_errors_with_message() {
.stderr(
"
error: Call to function `error` failed: Thing Not Supported
- --> justfile:1:6
- |
- 1 | x := error ('Thing Not Supported')
- | ^^^^^
+ ——▶ justfile:1:6
+ │
+ 1 │ x := error ('Thing Not Supported')
+ │ ^^^^^
",
)
.run();
diff --git a/tests/imports.rs b/tests/imports.rs
index 7adc5d56..265e5d3f 100644
--- a/tests/imports.rs
+++ b/tests/imports.rs
@@ -40,10 +40,10 @@ fn missing_import_file_error() {
.stderr(
"
error: Could not find source file for import.
- --> justfile:1:8
- |
- 1 | import './import.justfile'
- | ^^^^^^^^^^^^^^^^^^^
+ ——▶ justfile:1:8
+ │
+ 1 │ import './import.justfile'
+ │ ^^^^^^^^^^^^^^^^^^^
",
)
.run();
@@ -162,10 +162,10 @@ fn include_error() {
.stderr(
"
error: The `!include` directive has been stabilized as `import`
- --> justfile:1:1
- |
- 1 | !include foo
- | ^
+ ——▶ justfile:1:1
+ │
+ 1 │ !include foo
+ │ ^
",
)
.run();
diff --git a/tests/misc.rs b/tests/misc.rs
index e45ff2f6..66db8aed 100644
--- a/tests/misc.rs
+++ b/tests/misc.rs
@@ -72,10 +72,10 @@ test! {
",
stderr: "
error: Unknown setting `foo`
- --> justfile:1:5
- |
- 1 | set foo
- | ^^^
+ ——▶ justfile:1:5
+ │
+ 1 │ set foo
+ │ ^^^
",
status: EXIT_FAILURE,
}
@@ -87,10 +87,10 @@ test! {
",
stderr: "
error: Unknown setting `if`
- --> justfile:1:5
- |
- 1 | set if := 'foo'
- | ^^
+ ——▶ justfile:1:5
+ │
+ 1 │ set if := 'foo'
+ │ ^^
",
status: EXIT_FAILURE,
}
@@ -108,10 +108,10 @@ test! {
justfile: "alias foo := bar\nalias foo := baz\n",
stderr: "
error: Alias `foo` first defined on line 1 is redefined on line 2
- --> justfile:2:7
- |
- 2 | alias foo := baz
- | ^^^
+ ——▶ justfile:2:7
+ │
+ 2 │ alias foo := baz
+ │ ^^^
",
status: EXIT_FAILURE,
}
@@ -121,10 +121,10 @@ test! {
justfile: "alias foo := bar\n",
stderr: "
error: Alias `foo` has an unknown target `bar`
- --> justfile:1:7
- |
- 1 | alias foo := bar
- | ^^^
+ ——▶ justfile:1:7
+ │
+ 1 │ alias foo := bar
+ │ ^^^
",
status: EXIT_FAILURE,
}
@@ -134,10 +134,10 @@ test! {
justfile: "bar:\n echo bar\nalias foo := bar\nfoo:\n echo foo",
stderr: "
error: Alias `foo` defined on line 3 is redefined as a recipe on line 4
- --> justfile:4:1
- |
- 4 | foo:
- | ^^^
+ ——▶ justfile:4:1
+ │
+ 4 │ foo:
+ │ ^^^
",
status: EXIT_FAILURE,
}
@@ -234,10 +234,10 @@ test! {
justfile: "bar:\nhello:\nfoo: bar baaaaaaaz hello",
stderr: "
error: Recipe `foo` has unknown dependency `baaaaaaaz`
- --> justfile:3:10
- |
- 3 | foo: bar baaaaaaaz hello
- | ^^^^^^^^^
+ ——▶ justfile:3:10
+ │
+ 3 │ foo: bar baaaaaaaz hello
+ │ ^^^^^^^^^
",
status: EXIT_FAILURE,
}
@@ -261,10 +261,10 @@ test! {
justfile: "b := a\na := `exit 100`\nbar:\n echo '{{`exit 200`}}'",
stderr: "
error: Backtick failed with exit code 100
- --> justfile:2:6
- |
- 2 | a := `exit 100`
- | ^^^^^^^^^^
+ ——▶ justfile:2:6
+ │
+ 2 │ a := `exit 100`
+ │ ^^^^^^^^^^
",
status: 100,
}
@@ -274,10 +274,10 @@ test! {
justfile: "b := a\na := `echo hello`\nbar:\n echo '{{`exit 200`}}'",
stderr: "
error: Backtick failed with exit code 200
- --> justfile:4:10
- |
- 4 | echo '{{`exit 200`}}'
- | ^^^^^^^^^^
+ ——▶ justfile:4:10
+ │
+ 4 │ echo '{{`exit 200`}}'
+ │ ^^^^^^^^^^
",
status: 200,
}
@@ -287,10 +287,10 @@ test! {
justfile: "f:\n 無{{`exit 200`}}",
stderr: "
error: Backtick failed with exit code 200
- --> justfile:2:7
- |
- 2 | 無{{`exit 200`}}
- | ^^^^^^^^^^
+ ——▶ justfile:2:7
+ │
+ 2 │ 無{{`exit 200`}}
+ │ ^^^^^^^^^^
",
status: 200,
}
@@ -302,10 +302,10 @@ test! {
\techo {{`exit 200`}}
",
stderr: " error: Backtick failed with exit code 200
- --> justfile:2:9
- |
- 2 | echo {{`exit 200`}}
- | ^^^^^^^^^^
+ ——▶ justfile:2:9
+ │
+ 2 │ echo {{`exit 200`}}
+ │ ^^^^^^^^^^
",
status: 200,
}
@@ -317,10 +317,10 @@ test! {
\techo {{\t`exit 200`}}
",
stderr: "error: Backtick failed with exit code 200
- --> justfile:2:10
- |
-2 | echo {{ `exit 200`}}
- | ^^^^^^^^^^
+ ——▶ justfile:2:10
+ │
+2 │ echo {{ `exit 200`}}
+ │ ^^^^^^^^^^
",
status: 200,
}
@@ -333,10 +333,10 @@ test! {
",
stderr: "
error: Backtick failed with exit code 200
- --> justfile:2:10
- |
- 2 | echo {{ `exit 200`}}
- | ^^^^^^^^^^^^^^^^^
+ ——▶ justfile:2:10
+ │
+ 2 │ echo {{ `exit 200`}}
+ │ ^^^^^^^^^^^^^^^^^
",
status: 200,
}
@@ -349,10 +349,10 @@ test! {
",
stderr: "
error: Backtick failed with exit code 200
- --> justfile:2:13
- |
- 2 | echo 😬{{`exit 200`}}
- | ^^^^^^^^^^
+ ——▶ justfile:2:13
+ │
+ 2 │ echo 😬{{`exit 200`}}
+ │ ^^^^^^^^^^
",
status: 200,
}
@@ -365,10 +365,10 @@ test! {
",
stderr: "
error: Backtick failed with exit code 200
- --> justfile:2:24
- |
- 2 | echo 😬鎌鼬{{ `exit 200 # abc`}} 😬鎌鼬
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ ——▶ justfile:2:24
+ │
+ 2 │ echo 😬鎌鼬{{ `exit 200 # abc`}} 😬鎌鼬
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
",
status: 200,
}
@@ -389,10 +389,10 @@ test! {
",
stderr: "
error: Backtick failed with exit code 200
- --> justfile:10:10
- |
- 10 | echo '{{`exit 200`}}'
- | ^^^^^^^^^^
+ ——▶ justfile:10:10
+ │
+ 10 │ echo '{{`exit 200`}}'
+ │ ^^^^^^^^^^
",
status: 200,
}
@@ -406,10 +406,10 @@ test! {
stdout: "",
stderr: "
error: Backtick failed with exit code 123
- --> justfile:4:9
- |
- 4 | echo {{`exit 123`}}
- | ^^^^^^^^^^
+ ——▶ justfile:4:9
+ │
+ 4 │ echo {{`exit 123`}}
+ │ ^^^^^^^^^^
",
status: 123,
}
@@ -423,10 +423,10 @@ test! {
stderr: "
echo hello
error: Backtick failed with exit code 123
- --> justfile:3:9
- |
- 3 | echo {{`exit 123`}}
- | ^^^^^^^^^^
+ ——▶ justfile:3:9
+ │
+ 3 │ echo {{`exit 123`}}
+ │ ^^^^^^^^^^
",
status: 123,
}
@@ -440,10 +440,10 @@ a := `exit 222`",
stdout: "",
stderr: "
error: Backtick failed with exit code 222
- --> justfile:4:6
- |
- 4 | a := `exit 222`
- | ^^^^^^^^^^
+ ——▶ justfile:4:6
+ │
+ 4 │ a := `exit 222`
+ │ ^^^^^^^^^^
",
status: 222,
}
@@ -556,10 +556,10 @@ test! {
"#,
stdout: "",
stderr: "error: Unknown start of token:
- --> justfile:10:1
- |
-10 | ^^^
- | ^
+ ——▶ justfile:10:1
+ │
+10 │ ^^^
+ │ ^
",
status: EXIT_FAILURE,
}
@@ -661,7 +661,7 @@ test! {
justfile: "b := a\na := `exit 100`\nbar:\n echo '{{`exit 200`}}'",
args: ("--color", "always"),
stdout: "",
- stderr: "\u{1b}[1;31merror\u{1b}[0m: \u{1b}[1mBacktick failed with exit code 100\u{1b}[0m\n \u{1b}[1;34m-->\u{1b}[0m justfile:2:6\n \u{1b}[1;34m|\u{1b}[0m\n\u{1b}[1;34m2 |\u{1b}[0m a := `exit 100`\n \u{1b}[1;34m|\u{1b}[0m \u{1b}[1;31m^^^^^^^^^^\u{1b}[0m\n",
+ stderr: "\u{1b}[1;31merror\u{1b}[0m: \u{1b}[1mBacktick failed with exit code 100\u{1b}[0m\n \u{1b}[1;34m——▶\u{1b}[0m justfile:2:6\n \u{1b}[1;34m│\u{1b}[0m\n\u{1b}[1;34m2 │\u{1b}[0m a := `exit 100`\n \u{1b}[1;34m│\u{1b}[0m \u{1b}[1;31m^^^^^^^^^^\u{1b}[0m\n",
status: 100,
}
@@ -671,10 +671,10 @@ test! {
args: ("--color", "never"),
stdout: "",
stderr: "error: Backtick failed with exit code 100
- --> justfile:2:6
- |
-2 | a := `exit 100`
- | ^^^^^^^^^^
+ ——▶ justfile:2:6
+ │
+2 │ a := `exit 100`
+ │ ^^^^^^^^^^
",
status: 100,
}
@@ -685,10 +685,10 @@ test! {
args: ("--color", "auto"),
stdout: "",
stderr: "error: Backtick failed with exit code 100
- --> justfile:2:6
- |
-2 | a := `exit 100`
- | ^^^^^^^^^^
+ ——▶ justfile:2:6
+ │
+2 │ a := `exit 100`
+ │ ^^^^^^^^^^
",
status: 100,
}
@@ -724,10 +724,10 @@ test! {
stdout: "",
stderr: "error: Found a mix of tabs and spaces in leading whitespace: `␉␠`
Leading whitespace may consist of tabs or spaces, but not both
- --> justfile:2:1
- |
-2 | echo hello
- | ^^^^^
+ ——▶ justfile:2:1
+ │
+2 │ echo hello
+ │ ^^^^^
",
status: EXIT_FAILURE,
}
@@ -737,10 +737,10 @@ test! {
justfile: "bar:\n\t\techo hello\n\t\t\techo goodbye",
stdout: "",
stderr: "error: Recipe line has extra leading whitespace
- --> justfile:3:3
- |
-3 | echo goodbye
- | ^^^^^^^^^^^^^^^^
+ ——▶ justfile:3:3
+ │
+3 │ echo goodbye
+ │ ^^^^^^^^^^^^^^^^
",
status: EXIT_FAILURE,
}
@@ -751,10 +751,10 @@ test! {
stdout: "",
stderr: "error: Recipe line has inconsistent leading whitespace. \
Recipe started with `␉␉` but found line with `␉␠`
- --> justfile:3:1
- |
-3 | echo goodbye
- | ^^^^^
+ ——▶ justfile:3:1
+ │
+3 │ echo goodbye
+ │ ^^^^^
",
status: EXIT_FAILURE,
}
@@ -764,10 +764,10 @@ test! {
justfile: "bar:\nhello baz arg='foo' bar:",
stdout: "",
stderr: "error: Non-default parameter `bar` follows default parameter
- --> justfile:2:21
- |
-2 | hello baz arg='foo' bar:
- | ^^^
+ ——▶ justfile:2:21
+ │
+2 │ hello baz arg='foo' bar:
+ │ ^^^
",
status: EXIT_FAILURE,
}
@@ -777,10 +777,10 @@ test! {
justfile: "bar:\nhello baz +arg bar:",
stdout: "",
stderr: "error: Parameter `bar` follows variadic parameter
- --> justfile:2:16
- |
-2 | hello baz +arg bar:
- | ^^^
+ ——▶ justfile:2:16
+ │
+2 │ hello baz +arg bar:
+ │ ^^^
",
status: EXIT_FAILURE,
}
@@ -790,10 +790,10 @@ test! {
justfile: "bar:\nhello baz *arg bar:",
stdout: "",
stderr: "error: Parameter `bar` follows variadic parameter
- --> justfile:2:16
- |
-2 | hello baz *arg bar:
- | ^^^
+ ——▶ justfile:2:16
+ │
+2 │ hello baz *arg bar:
+ │ ^^^
",
status: EXIT_FAILURE,
}
@@ -1163,10 +1163,10 @@ bar:"#,
args: ("bar"),
stdout: "",
stderr: r#"error: Call to unknown function `foo`
- --> justfile:1:8
- |
-1 | foo := foo() + "hello"
- | ^^^
+ ——▶ justfile:1:8
+ │
+1 │ foo := foo() + "hello"
+ │ ^^^
"#,
status: EXIT_FAILURE,
<