File tree Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 2222# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323# SOFTWARE.
2424
25- VERSION=" 0.10.0a1 "
25+ VERSION=" 0.10.0a2 "
2626USAGE=" bash-env-json [--help] [--shellfns <comma-separated-function-names>] [path]"
2727
2828shopt -s extglob
@@ -63,7 +63,7 @@ function capture() {
6363function emit_value() {
6464 # `jq -R` produces nothing on empty input, but we want ""
6565 if test -n " $1 " ; then
66- echo -n " $1 " | _jq -R
66+ echo -n " $1 " | _jq -Rs
6767 else
6868 echo -n ' ""'
6969 fi
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ function test_case() {
1313 echo " $@ "
1414
1515 # sort and remove `meta` before comparison with expected output
16- bash-env-json " $@ " " $_test_file " | jq --sort-keys ' del(.meta)' | diff -w - " $_expected_output "
16+ ./ bash-env-json " $@ " " $_test_file " | jq --sort-keys ' del(.meta)' | diff -w - " $_expected_output "
1717}
1818
1919@test " empty" {
@@ -40,11 +40,14 @@ function test_case() {
4040 test_case " Ming's menu of (merciless) monstrosities"
4141}
4242
43+ @test " multiline-string" {
44+ test_case multiline-string
45+ }
46+
4347@test " error" {
4448 test_case error
4549}
4650
47-
4851@test " shell-function-error" {
4952 test_case shell-function-error --shellfns f
5053}
Original file line number Diff line number Diff line change 1+ export MULTILINE = " a
2+ b
3+ c"
Original file line number Diff line number Diff line change 1+ {
2+ "env" : {
3+ "MULTILINE" : " a\n b\n c"
4+ },
5+ "shellvars" : { }
6+ }
Original file line number Diff line number Diff line change 1+ unset MULTILINE
You can’t perform that action at this time.
0 commit comments