Working around github strangeness

This commit is contained in:
Mike Farah
2022-01-27 13:54:29 +11:00
parent 8761920f58
commit 3ba728d40c
4 changed files with 23 additions and 3 deletions
+5 -2
View File
@@ -7,8 +7,11 @@ setUp() {
EOL
}
# hack - for some reason in github actions, it
# golang thinks yq has stdin pipeinto it (ModeNamedPipe is set, ModeCharDevice is not)
# explicitly add an expression so it doesnt try to read 'test.yml' as one...
testEmptyEval() {
X=$(./yq e test.yml -v)
X=$(./yq e "." test.yml)
expected=$(cat test.yml)
assertEquals 0 $?
assertEquals "$expected" "$X"
@@ -16,7 +19,7 @@ testEmptyEval() {
testEmptyEvalNoNewLine() {
echo -n "#comment" >test.yml
X=$(./yq e test.yml)
X=$(./yq e "." test.yml)
expected=$(cat test.yml)
assertEquals 0 $?
assertEquals "$expected" "$X"