-
Notifications
You must be signed in to change notification settings - Fork 704
Expand file tree
/
Copy pathallow_missing.rs
More file actions
45 lines (39 loc) · 992 Bytes
/
allow_missing.rs
File metadata and controls
45 lines (39 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
use super::*;
#[test]
fn allow_missing_recipes_in_run_invocation() {
Test::new()
.arg("foo")
.stderr("error: Justfile does not contain recipe `foo`\n")
.failure();
Test::new().args(["--allow-missing", "foo"]).success();
}
#[test]
fn allow_missing_modules_in_run_invocation() {
Test::new()
.arg("foo::bar")
.stderr("error: Justfile does not contain submodule `foo`\n")
.failure();
Test::new().args(["--allow-missing", "foo::bar"]).success();
}
#[test]
fn allow_missing_does_not_apply_to_compilation_errors() {
Test::new()
.justfile("bar: foo")
.args(["--allow-missing", "foo"])
.stderr(
r"Error: Recipe `bar` has unknown dependency `foo`
â•─[ justfile:1:6 ]
│
1 │ bar: foo
───╯
",
)
.failure();
}
#[test]
fn allow_missing_does_not_apply_to_other_subcommands() {
Test::new()
.args(["--allow-missing", "--show", "foo"])
.stderr("error: Justfile does not contain recipe `foo`\n")
.failure();
}