2022-06-18 21:56:31 -07:00
|
|
|
use super::*;
|
2022-02-14 18:37:06 -08:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn allow_duplicate_recipes() {
|
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
"
|
|
|
|
b:
|
|
|
|
echo foo
|
|
|
|
b:
|
|
|
|
echo bar
|
|
|
|
|
|
|
|
set allow-duplicate-recipes
|
|
|
|
",
|
|
|
|
)
|
|
|
|
.stdout("bar\n")
|
|
|
|
.stderr("echo bar\n")
|
|
|
|
.run();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn allow_duplicate_recipes_with_args() {
|
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
"
|
|
|
|
b a:
|
|
|
|
echo foo
|
|
|
|
b c d:
|
|
|
|
echo bar {{c}} {{d}}
|
|
|
|
|
|
|
|
set allow-duplicate-recipes
|
|
|
|
",
|
|
|
|
)
|
2023-01-03 22:31:56 -08:00
|
|
|
.args(["b", "one", "two"])
|
2022-02-14 18:37:06 -08:00
|
|
|
.stdout("bar one two\n")
|
|
|
|
.stderr("echo bar one two\n")
|
|
|
|
.run();
|
|
|
|
}
|