Skip to content

Commit

Permalink
test: add some test cases for env var templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 21, 2024
1 parent 821be63 commit c938977
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
16 changes: 14 additions & 2 deletions e2e/env/test_env_template
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"
1 change: 1 addition & 0 deletions mise.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ version = "1.1.40"
backend = "core:bun"

[tools.bun.checksums]
"bun-darwin-aarch64.zip" = "sha256:8b59f2f08da45f851fcd8901e0e87628cf00f1aa65fb2ce1ed88a455c0895f03"
"bun-linux-x64-baseline.zip" = "sha256:c6be2321e8028c6376098fa29baad1cd454f4f33827ff426fdd5ce79695f6d27"

[tools.cargo-binstall]
Expand Down

0 comments on commit c938977

Please sign in to comment.