diff --git a/acceptance_tests/inputs-format.sh b/acceptance_tests/inputs-format.sh index 51bd207e..acb1c3d3 100755 --- a/acceptance_tests/inputs-format.sh +++ b/acceptance_tests/inputs-format.sh @@ -58,6 +58,27 @@ EOM assertEquals "$expected" "$X" } +testInputXmlNamespaces() { + cat >test.yml < + + +EOL + + read -r -d '' expected << EOM +map: + +xmlns: some-namespace + +xmlns:xsi: some-instance + +xsi:schemaLocation: some-url +EOM + + X=$(./yq e -p=xml test.yml) + assertEquals "$expected" "$X" + + X=$(./yq ea -p=xml test.yml) + assertEquals "$expected" "$X" +} + testInputXmlStrict() { cat >test.yml <