Hotfix: actually update the default xml attribute prefix #1428

This commit is contained in:
Mike Farah
2022-11-13 11:13:34 +11:00
parent 83ef7ee5cf
commit 88ce6ffcbe
7 changed files with 97 additions and 69 deletions
+5 -5
View File
@@ -109,7 +109,7 @@ EOL
read -r -d '' expected << EOM
cat:
+content: BiBi
+legs: "4"
+@legs: "4"
EOM
X=$(./yq e -p=xml test.yml)
@@ -129,9 +129,9 @@ EOL
read -r -d '' expected << EOM
+p_xml: version="1.0"
map:
+xmlns: some-namespace
+xmlns:xsi: some-instance
+xsi:schemaLocation: some-url
+@xmlns: some-namespace
+@xmlns:xsi: some-instance
+@xsi:schemaLocation: some-url
EOM
X=$(./yq e -p=xml test.yml)
@@ -190,7 +190,7 @@ EOL
read -r -d '' expected << EOM
cat:
+content: BiBi
+legs: "4"
+@legs: "4"
EOM
X=$(cat /dev/null | ./yq e -p=xml test.yml)
+1 -1
View File
@@ -252,7 +252,7 @@ EOM
testOutputXmComplex() {
cat >test.yml <<EOL
a: {b: {c: ["cat", "dog"], +f: meow}}
a: {b: {c: ["cat", "dog"], +@f: meow}}
EOL
read -r -d '' expected << EOM