diff --git a/acceptance_tests/basic.sh b/acceptance_tests/basic.sh index d4d97141..1e19d0b7 100755 --- a/acceptance_tests/basic.sh +++ b/acceptance_tests/basic.sh @@ -10,6 +10,12 @@ testBasicEvalRoundTrip() { assertEquals 123 "$X" } +testBasicEvalRoundTripNoEval() { + ./yq -n ".a = 123" > test.yml + X=$(./yq '.a' test.yml) + assertEquals 123 "$X" +} + testBasicStdInWithOneArg() { ./yq e -n ".a = 123" > test.yml X=$(cat test.yml | ./yq e ".a") @@ -17,6 +23,9 @@ testBasicStdInWithOneArg() { X=$(cat test.yml | ./yq ea ".a") assertEquals 123 "$X" + + X=$(cat test.yml | ./yq ".a") + assertEquals 123 "$X" } testBasicUpdateInPlaceSequence() { @@ -28,6 +37,15 @@ EOL assertEquals "10" "$X" } +testBasicUpdateInPlaceSequenceNoEval() { + cat >test.yml <test.yml < test.yml + X=$(./yq -e '.z' test.yml 2&>/dev/null) + assertEquals 1 "$?" +} + testBasicExtractFieldWithSeperator() { cat >test.yml <