-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add some test cases for env var templates
- Loading branch information
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
cat <<EOF >.mise.toml | ||
cat <<EOF >mise.toml | ||
[env] | ||
ENV_TMPL_EXEC = "{{ exec(command='echo foo') }}" | ||
EOF | ||
|
||
assert "mise env -s zsh | grep ENV_TMPL_EXEC" "export ENV_TMPL_EXEC=foo" | ||
|
||
cat <<EOF >mise.toml | ||
[env] | ||
B = "{{ env.A }}" | ||
EOF | ||
A=a assert "mise env -s bash | grep B" "export B=a" | ||
|
||
cat <<EOF >mise.toml | ||
[env] | ||
A = "a" | ||
B = "{{ env.A }}" | ||
EOF | ||
assert "mise env -s bash | grep B" "export B=a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters