mirror of
https://github.com/casey/just.git
synced 2024-11-23 11:04:09 +03:00
d03aedd5c4
If variable names are passed to `--evaluate`, only print those variables.
44 lines
579 B
Rust
44 lines
579 B
Rust
test! {
|
|
name: evaluate,
|
|
justfile: r#"
|
|
foo := "a\t"
|
|
hello := "c"
|
|
bar := "b\t"
|
|
ab := foo + bar + hello
|
|
|
|
wut:
|
|
touch /this/is/not/a/file
|
|
"#,
|
|
args: ("--evaluate"),
|
|
stdout: r#"ab := "a b c"
|
|
bar := "b "
|
|
foo := "a "
|
|
hello := "c"
|
|
"#,
|
|
}
|
|
|
|
test! {
|
|
name: evaluate_empty,
|
|
justfile: "
|
|
a := 'foo'
|
|
",
|
|
args: ("--evaluate"),
|
|
stdout: r#"
|
|
a := "foo"
|
|
"#,
|
|
}
|
|
|
|
test! {
|
|
name: evaluate_arguments,
|
|
justfile: "
|
|
a := 'x'
|
|
b := 'y'
|
|
c := 'z'
|
|
",
|
|
args: ("--evaluate", "a", "c"),
|
|
stdout: r#"
|
|
a := "x"
|
|
c := "z"
|
|
"#,
|
|
}
|