Skip to content

Commit db1ff03

Browse files
committed
Tests
1 parent e6d21f0 commit db1ff03

File tree

3 files changed

+35
-34
lines changed

3 files changed

+35
-34
lines changed

β€Žtests/string.rsβ€Ž

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ test! {
184184
args: ("a"),
185185
stdout: "",
186186
stderr: "
187-
error: Unterminated string
188-
β€”β€”β–Ά justfile:1:6
189-
β”‚
190-
1 β”‚ a b= ':
191-
β”‚ ^
192-
",
187+
Error: Unterminated string
188+
╭─[justfile:1:6]
189+
β”‚
190+
1 β”‚ a b= ':
191+
───╯
192+
",
193193
status: EXIT_FAILURE,
194194
}
195195

@@ -201,12 +201,12 @@ test! {
201201
args: ("a"),
202202
stdout: "",
203203
stderr: r#"
204-
error: Unterminated string
205-
β€”β€”β–Ά justfile:1:6
206-
β”‚
207-
1 β”‚ a b= ":
208-
β”‚ ^
209-
"#,
204+
Error: Unterminated string
205+
╭─[justfile:1:6]
206+
β”‚
207+
1 β”‚ a b= ":
208+
───╯
209+
"#,
210210
status: EXIT_FAILURE,
211211
}
212212

@@ -234,11 +234,11 @@ test! {
234234
args: ("a"),
235235
stdout: "",
236236
stderr: "
237-
error: Unterminated string
238-
β€”β€”β–Ά justfile:1:6
239-
β”‚
240-
1 β”‚ a b= ''':
241-
β”‚ ^^^
237+
Error: Unterminated string
238+
╭─[justfile:1:6]
239+
β”‚
240+
1 β”‚ a b= ''':
241+
───╯
242242
",
243243
status: EXIT_FAILURE,
244244
}
@@ -251,11 +251,11 @@ test! {
251251
args: ("a"),
252252
stdout: "",
253253
stderr: r#"
254-
error: Unterminated string
255-
β€”β€”β–Ά justfile:1:6
256-
β”‚
257-
1 β”‚ a b= """:
258-
β”‚ ^^^
254+
Error: Unterminated string
255+
╭─[justfile:1:6]
256+
β”‚
257+
1 β”‚ a b= """:
258+
───╯
259259
"#,
260260
status: EXIT_FAILURE,
261261
}
@@ -517,11 +517,11 @@ fn unicode_escape_too_long() {
517517
.status(1)
518518
.stderr(
519519
r#"
520-
error: unicode escape sequence starting with `\u{FFFFFFF` longer than six hex digits
521-
β€”β€”β–Ά justfile:1:6
522-
β”‚
523-
1 β”‚ x := "\u{FFFFFFFFFF}"
524-
β”‚ ^^^^^^^^^^^^^^^^
520+
Error: unicode escape sequence starting with `\u{FFFFFFF` longer than six hex digits
521+
╭─[justfile:1:6]
522+
β”‚
523+
1 β”‚ x := "\u{FFFFFFFFFF}"
524+
───╯
525525
"#,
526526
)
527527
.run();

β€Žtests/test.rsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ impl Test {
228228
fn compare_string(name: &str, have: &str, want: &str) -> bool {
229229
let equal = have == want;
230230
if !equal {
231-
eprintln!("Bad {name}: {}", StrComparison::new(&have, &want));
231+
//eprintln!("Bad {name}: {}", StrComparison::new(&have, &want));
232+
eprintln!("Bad {name}:\n{}||\n-------------\n{}||\n=========", &have, &want);
232233
}
233234
equal
234235
}

β€Žtests/working_directory.rsβ€Ž

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,12 @@ fn attribute_with_nocd_is_forbidden() {
381381
)
382382
.stderr(
383383
"
384-
error: Recipe `bar` has both `[no-cd]` and `[working-directory]` attributes
385-
β€”β€”β–Ά justfile:3:1
386-
β”‚
387-
3 β”‚ bar:
388-
β”‚ ^^^
389-
",
384+
Error: Recipe `bar` has both `[no-cd]` and `[working-directory]` attributes
385+
╭─[justfile:3:1]
386+
β”‚
387+
3 β”‚ bar:
388+
───╯
389+
"
390390
)
391391
.status(EXIT_FAILURE)
392392
.run();

0 commit comments

Comments
Β (0)