1
1
mirror of https://github.com/casey/just.git synced 2024-11-23 02:44:56 +03:00
just/tests/run.rs

45 lines
664 B
Rust
Raw Normal View History

use super::*;
#[test]
fn dont_run_duplicate_recipes() {
Test::new()
.justfile(
"
@foo:
echo foo
",
)
2023-01-04 09:31:56 +03:00
.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();
}