mirror of
https://github.com/casey/just.git
synced 2025-12-23 11:37:29 +00:00
Some checks failed
CI / lint (push) Has been cancelled
CI / msrv (push) Has been cancelled
CI / pages (push) Has been cancelled
CI / test (macos-latest) (push) Has been cancelled
CI / test (ubuntu-latest) (push) Has been cancelled
CI / test (windows-latest) (push) Has been cancelled
43 lines
687 B
Rust
43 lines
687 B
Rust
use super::*;
|
|
|
|
#[test]
|
|
fn default_attribute_overrides_first_recipe() {
|
|
Test::new()
|
|
.justfile(
|
|
"
|
|
foo:
|
|
@echo FOO
|
|
|
|
[default]
|
|
bar:
|
|
@echo BAR
|
|
",
|
|
)
|
|
.stdout("BAR\n")
|
|
.run();
|
|
}
|
|
|
|
#[test]
|
|
fn default_attribute_may_only_appear_once_per_justfile() {
|
|
Test::new()
|
|
.justfile(
|
|
"
|
|
[default]
|
|
foo:
|
|
|
|
[default]
|
|
bar:
|
|
",
|
|
)
|
|
.stderr(
|
|
"
|
|
error: Recipe `foo` has duplicate `[default]` attribute, which may only appear once per module
|
|
——▶ justfile:2:1
|
|
│
|
|
2 │ foo:
|
|
│ ^^^
|
|
"
|
|
)
|
|
.status(EXIT_FAILURE)
|
|
.run();
|
|
}
|