2022-11-23 03:25:57 +03:00
|
|
|
use super::*;
|
|
|
|
|
|
|
|
#[test]
|
2022-12-20 11:44:19 +03:00
|
|
|
fn private_attribute_for_recipe() {
|
2022-11-23 03:25:57 +03:00
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
"
|
|
|
|
[private]
|
|
|
|
foo:
|
|
|
|
",
|
|
|
|
)
|
2023-01-04 09:31:56 +03:00
|
|
|
.args(["--list"])
|
2022-11-23 03:25:57 +03:00
|
|
|
.stdout(
|
|
|
|
"
|
|
|
|
Available recipes:
|
|
|
|
",
|
|
|
|
)
|
|
|
|
.run();
|
|
|
|
}
|
2022-12-20 11:44:19 +03:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn private_attribute_for_alias() {
|
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
"
|
|
|
|
[private]
|
|
|
|
alias f := foo
|
|
|
|
|
|
|
|
foo:
|
|
|
|
",
|
|
|
|
)
|
2023-01-04 09:31:56 +03:00
|
|
|
.args(["--list"])
|
2022-12-20 11:44:19 +03:00
|
|
|
.stdout(
|
|
|
|
"
|
|
|
|
Available recipes:
|
|
|
|
foo
|
|
|
|
",
|
|
|
|
)
|
|
|
|
.run();
|
|
|
|
}
|
2024-08-10 21:22:07 +03:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn private_variables_are_not_listed() {
|
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
"
|
|
|
|
[private]
|
|
|
|
foo := 'one'
|
|
|
|
bar := 'two'
|
|
|
|
_baz := 'three'
|
|
|
|
",
|
|
|
|
)
|
|
|
|
.args(["--variables"])
|
|
|
|
.stdout("bar\n")
|
|
|
|
.run();
|
|
|
|
}
|