1
1
mirror of https://github.com/wader/fq.git synced 2024-11-24 03:05:22 +03:00
fq/format/xml/testdata/test.svg.fqtest
2022-08-25 17:15:23 +02:00

127 lines
3.9 KiB
Plaintext

$ fq -r '. as $a | ., (toxml({indent: 2}) | ., (fromxml | ., (diff($a; .) // "no diff")))' test.svg
{
"svg": {
"@height": "2500",
"@inkscape:version": "1.0 (4035a4f, 2020-05-01)",
"@sodipodi:docname": "ffclippy.svg",
"@version": "1.1",
"@viewBox": "0 0 192.756 192.756",
"@width": "2500",
"@xmlns": "http://www.w3.org/2000/svg",
"@xmlns:inkscape": "http://www.inkscape.org/namespaces/inkscape",
"@xmlns:sodipodi": "http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",
"@xmlns:svg": "http://www.w3.org/2000/svg",
"g": {
"@clip-rule": "evenodd",
"@fill-rule": "evenodd",
"@id": "g863"
},
"sodipodi:namedview": {
"@pagecolor": "#ffffff",
"@showgrid": "false"
}
}
}
<svg height="2500" inkscape:version="1.0 (4035a4f, 2020-05-01)" sodipodi:docname="ffclippy.svg" version="1.1" viewBox="0 0 192.756 192.756" width="2500" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg">
<g clip-rule="evenodd" fill-rule="evenodd" id="g863"></g>
<sodipodi:namedview pagecolor="#ffffff" showgrid="false"></sodipodi:namedview>
</svg>
{
"svg": {
"@height": "2500",
"@inkscape:version": "1.0 (4035a4f, 2020-05-01)",
"@sodipodi:docname": "ffclippy.svg",
"@version": "1.1",
"@viewBox": "0 0 192.756 192.756",
"@width": "2500",
"@xmlns": "http://www.w3.org/2000/svg",
"@xmlns:inkscape": "http://www.inkscape.org/namespaces/inkscape",
"@xmlns:sodipodi": "http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",
"@xmlns:svg": "http://www.w3.org/2000/svg",
"g": {
"@clip-rule": "evenodd",
"@fill-rule": "evenodd",
"@id": "g863"
},
"sodipodi:namedview": {
"@pagecolor": "#ffffff",
"@showgrid": "false"
}
}
}
no diff
$ fq -r -o array=true '. as $a | ., (toxml({indent: 2}) | ., (fromxml | ., (diff($a; .) // "no diff")))' test.svg
[
"svg",
{
"height": "2500",
"inkscape:version": "1.0 (4035a4f, 2020-05-01)",
"sodipodi:docname": "ffclippy.svg",
"version": "1.1",
"viewBox": "0 0 192.756 192.756",
"width": "2500",
"xmlns": "http://www.w3.org/2000/svg",
"xmlns:inkscape": "http://www.inkscape.org/namespaces/inkscape",
"xmlns:sodipodi": "http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",
"xmlns:svg": "http://www.w3.org/2000/svg"
},
[
[
"sodipodi:namedview",
{
"pagecolor": "#ffffff",
"showgrid": "false"
},
[]
],
[
"g",
{
"clip-rule": "evenodd",
"fill-rule": "evenodd",
"id": "g863"
},
[]
]
]
]
<svg height="2500" inkscape:version="1.0 (4035a4f, 2020-05-01)" sodipodi:docname="ffclippy.svg" version="1.1" viewBox="0 0 192.756 192.756" width="2500" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview pagecolor="#ffffff" showgrid="false"></sodipodi:namedview>
<g clip-rule="evenodd" fill-rule="evenodd" id="g863"></g>
</svg>
[
"svg",
{
"height": "2500",
"inkscape:version": "1.0 (4035a4f, 2020-05-01)",
"sodipodi:docname": "ffclippy.svg",
"version": "1.1",
"viewBox": "0 0 192.756 192.756",
"width": "2500",
"xmlns": "http://www.w3.org/2000/svg",
"xmlns:inkscape": "http://www.inkscape.org/namespaces/inkscape",
"xmlns:sodipodi": "http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",
"xmlns:svg": "http://www.w3.org/2000/svg"
},
[
[
"sodipodi:namedview",
{
"pagecolor": "#ffffff",
"showgrid": "false"
},
[]
],
[
"g",
{
"clip-rule": "evenodd",
"fill-rule": "evenodd",
"id": "g863"
},
[]
]
]
]
no diff