1
1
mirror of https://github.com/casey/just.git synced 2024-11-25 15:34:13 +03:00
just/tests/private.rs

57 lines
730 B
Rust
Raw Normal View History

use super::*;
#[test]
fn private_attribute_for_recipe() {
Test::new()
.justfile(
"
[private]
foo:
",
)
2023-01-04 09:31:56 +03:00
.args(["--list"])
.stdout(
"
Available recipes:
",
)
.run();
}
#[test]
fn private_attribute_for_alias() {
Test::new()
.justfile(
"
[private]
alias f := foo
foo:
",
)
2023-01-04 09:31:56 +03:00
.args(["--list"])
.stdout(
"
Available recipes:
foo
",
)
.run();
}
#[test]
fn private_variables_are_not_listed() {
Test::new()
.justfile(
"
[private]
foo := 'one'
bar := 'two'
_baz := 'three'
",
)
.args(["--variables"])
.stdout("bar\n")
.run();
}