summaryrefslogtreecommitdiffstats
path: root/test/json/to-yaml-1
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:48:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:48:59 +0000
commitc484829272cd13a738e35412498e12f2c9a194ac (patch)
treea1f5ec09629ee895bd3963fa8820b45f2f4c574b /test/json/to-yaml-1
parentInitial commit. (diff)
downloadliborcus-c484829272cd13a738e35412498e12f2c9a194ac.tar.xz
liborcus-c484829272cd13a738e35412498e12f2c9a194ac.zip
Adding upstream version 0.19.2.upstream/0.19.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/json/to-yaml-1')
-rw-r--r--test/json/to-yaml-1/check.txt14
-rw-r--r--test/json/to-yaml-1/input.json1
-rw-r--r--test/json/to-yaml-1/output.yaml4
3 files changed, 19 insertions, 0 deletions
diff --git a/test/json/to-yaml-1/check.txt b/test/json/to-yaml-1/check.txt
new file mode 100644
index 0000000..955eee1
--- /dev/null
+++ b/test/json/to-yaml-1/check.txt
@@ -0,0 +1,14 @@
+ns0="http://schemas.kohei.us/orcus/2015/json"
+/ns0:object
+/ns0:object/ns0:item
+/ns0:object/ns0:item@name="A:B:C"
+/ns0:object/ns0:item/ns0:number
+/ns0:object/ns0:item/ns0:number@value="123"
+/ns0:object/ns0:item
+/ns0:object/ns0:item@name="#text"
+/ns0:object/ns0:item/ns0:string
+/ns0:object/ns0:item/ns0:string@value="my value"
+/ns0:object/ns0:item
+/ns0:object/ns0:item@name="A: B: C: "
+/ns0:object/ns0:item/ns0:number
+/ns0:object/ns0:item/ns0:number@value="456"
diff --git a/test/json/to-yaml-1/input.json b/test/json/to-yaml-1/input.json
new file mode 100644
index 0000000..3dedc8a
--- /dev/null
+++ b/test/json/to-yaml-1/input.json
@@ -0,0 +1 @@
+{ "A:B:C": 123, "#text": "my value", "A: B: C: ": 456 }
diff --git a/test/json/to-yaml-1/output.yaml b/test/json/to-yaml-1/output.yaml
new file mode 100644
index 0000000..1d8628a
--- /dev/null
+++ b/test/json/to-yaml-1/output.yaml
@@ -0,0 +1,4 @@
+---
+A:B:C: 123
+"#text": my value
+"A: B: C: ": 456