From b2380399a89a67af42887a6688980187d2d765ec Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Tue, 20 Jul 2021 11:12:41 +1000 Subject: [PATCH] Added more tests --- acceptance_tests/leading-seperator.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/acceptance_tests/leading-seperator.sh b/acceptance_tests/leading-seperator.sh index 3fc97c58..82f67d37 100755 --- a/acceptance_tests/leading-seperator.sh +++ b/acceptance_tests/leading-seperator.sh @@ -36,6 +36,33 @@ testLeadingSeperatorPipeIntoEvalSeq() { assertEquals "$expected" "$X" } +testLeadingSeperatorExtractField() { + X=$(./yq e '.a' - < test.yml) + assertEquals "test" "$X" +} + +testLeadingSeperatorExtractFieldWithCommentsAfterSep() { + cat >test.yml <test.yml <