1
1
mirror of https://github.com/casey/just.git synced 2024-11-23 11:04:09 +03:00
just/tests/attributes.rs

44 lines
645 B
Rust
Raw Normal View History

use super::*;
#[test]
fn all() {
Test::new()
.justfile(
"
[macos]
[windows]
[linux]
[unix]
[no-exit-message]
foo:
exit 1
",
)
.stderr("exit 1\n")
.status(1)
.run();
}
#[test]
fn duplicate_attributes_are_disallowed() {
Test::new()
.justfile(
"
[no-exit-message]
[no-exit-message]
foo:
echo bar
",
)
.stderr(
"
error: Recipe attribute `no-exit-message` first used on line 1 is duplicated on line 2
|
2 | [no-exit-message]
| ^^^^^^^^^^^^^^^
",
)
.status(1)
.run();
}