mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-15 07:38:14 +00:00
27 lines
316 B
Bash
27 lines
316 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
setUp() {
|
||
|
rm test*.yq || true
|
||
|
cat >test.yq <<EOL
|
||
|
#!./yq
|
||
|
.a.b
|
||
|
EOL
|
||
|
chmod +x test.yq
|
||
|
|
||
|
rm test*.yml || true
|
||
|
cat >test.yml <<EOL
|
||
|
a: {b: apple}
|
||
|
EOL
|
||
|
}
|
||
|
|
||
|
testCanExecYqFile() {
|
||
|
read -r -d '' expected << EOM
|
||
|
apple
|
||
|
EOM
|
||
|
X=$(./test.yq test.yml)
|
||
|
assertEquals "$expected" "$X"
|
||
|
}
|
||
|
|
||
|
source ./scripts/shunit2
|
||
|
|