Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions crates/bashkit/tests/spec_cases/bash/bash-c-exports.test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### bash_c_sees_exported_vars
# bash -c should inherit exported variables
export TEST_EXPORT_VAR="visible"
bash -c 'echo "$TEST_EXPORT_VAR"'
### expect
visible
### end

### bash_c_assigns_from_export
# bash -c can assign from exported vars
export TEST_ASSIGN_VAR="value"
bash -c 'x=$TEST_ASSIGN_VAR; echo "x=$x"'
### expect
x=value
### end

### bash_c_multiple_exports
# bash -c sees multiple exports
export A1=one A2=two
bash -c 'echo "$A1 $A2"'
### expect
one two
### end
Loading