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
use super::*;
#[test]
fn dont_run_duplicate_recipes() {
Test::new()
.justfile(
"
@foo:
echo foo
",
)
.args(["foo", "foo"])
.stdout("foo\n")
.run();
}
#[test]
fn one_flag_only_allows_one_invocation() {
Test::new()
.justfile(
"
@foo:
echo foo
",
)
.args(["--one", "foo"])
.stdout("foo\n")
.run();
Test::new()
.justfile(
"
@foo:
echo foo
@bar:
echo bar
",
)
.args(["--one", "foo", "bar"])
.stderr("error: Expected 1 command-line recipe invocation but found 2.\n")
.status(1)
.run();
}