Loading tbc_envsubst.sh +5 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,11 @@ function tbc_envsubst() { } return enc } !/# *nosubst/ { /# *nosubst/ { print $0 next } { orig_line = $0 line = $0 count_repl_in_line = 0 Loading tests/tbc_envsubst.bats +11 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ function setup() { export ASCIICHARS=$'\t\n\r'" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_\`abcdefghijklmnopqrstuvwxyz{|}~" } @test "no subst" { @test "no subst pattern" { # GIVEN # WHEN Loading @@ -39,6 +39,16 @@ function setup() { assert_equal "$RESULT" '<<<basic>>>' } @test "nosubst prevents subst" { # GIVEN # WHEN RESULT=$(echo -e 'subst: ${VAR_BASIC}\nnosubst: ${VAR_BASIC} # nosubst' | tbc_envsubst) # THEN assert_equal "$RESULT" "subst: basic${CR}nosubst: \${VAR_BASIC} # nosubst" } @test "basic percent" { # GIVEN Loading Loading
tbc_envsubst.sh +5 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,11 @@ function tbc_envsubst() { } return enc } !/# *nosubst/ { /# *nosubst/ { print $0 next } { orig_line = $0 line = $0 count_repl_in_line = 0 Loading
tests/tbc_envsubst.bats +11 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ function setup() { export ASCIICHARS=$'\t\n\r'" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_\`abcdefghijklmnopqrstuvwxyz{|}~" } @test "no subst" { @test "no subst pattern" { # GIVEN # WHEN Loading @@ -39,6 +39,16 @@ function setup() { assert_equal "$RESULT" '<<<basic>>>' } @test "nosubst prevents subst" { # GIVEN # WHEN RESULT=$(echo -e 'subst: ${VAR_BASIC}\nnosubst: ${VAR_BASIC} # nosubst' | tbc_envsubst) # THEN assert_equal "$RESULT" "subst: basic${CR}nosubst: \${VAR_BASIC} # nosubst" } @test "basic percent" { # GIVEN Loading