aboutsummaryrefslogtreecommitdiff
path: root/contrib/libxo/tests
diff options
context:
space:
mode:
authorPhil Shafer <phil@FreeBSD.org>2017-05-16 18:46:56 +0000
committerPhil Shafer <phil@FreeBSD.org>2017-05-16 18:46:56 +0000
commit8a6eceff3ce76a4bb9078f3fa710f51ab6671ca3 (patch)
treec44988516a1948074e96f0191e6c2a1625c4f0e8 /contrib/libxo/tests
parent6dfb9460caf3466b23b2a24c7ac91ebbb0747226 (diff)
parentf720a75aba553acfa285f6788564d4a6d7b43d34 (diff)
Import libxo-0.7.2; add xo_options.7.
Submitted by: phil Reviewed by: sjg Approved by: sjg (mentor)
Notes
Notes: svn path=/head/; revision=318364
Diffstat (limited to 'contrib/libxo/tests')
-rw-r--r--contrib/libxo/tests/core/saved/test_01.E.out2
-rw-r--r--contrib/libxo/tests/core/saved/test_01.J.out2
-rw-r--r--contrib/libxo/tests/core/saved/test_01.JP.out2
-rw-r--r--contrib/libxo/tests/core/saved/test_01.X.out2
-rw-r--r--contrib/libxo/tests/core/saved/test_01.XP.out2
-rw-r--r--contrib/libxo/tests/core/saved/test_10.X.out2
-rw-r--r--contrib/libxo/tests/core/saved/test_10.XP.out2
-rw-r--r--contrib/libxo/tests/core/saved/test_11.X.out2
-rw-r--r--contrib/libxo/tests/core/saved/test_11.XP.out2
-rw-r--r--contrib/libxo/tests/core/test_01.c4
-rw-r--r--contrib/libxo/tests/gettext/saved/gt_01.J.out2
-rw-r--r--contrib/libxo/tests/gettext/saved/gt_01.JP.out2
12 files changed, 18 insertions, 8 deletions
diff --git a/contrib/libxo/tests/core/saved/test_01.E.out b/contrib/libxo/tests/core/saved/test_01.E.out
index de23baad0b16..75f5d0a1d3da 100644
--- a/contrib/libxo/tests/core/saved/test_01.E.out
+++ b/contrib/libxo/tests/core/saved/test_01.E.out
@@ -1,5 +1,7 @@
op create: [] []
op open_container: [top] []
+op content: [kve_start] [0xdeadbeef]
+op content: [kve_end] [0xcabb1e]
op string: [host] [my-box]
op string: [domain] [example.com]
op string: [host] [my-box]
diff --git a/contrib/libxo/tests/core/saved/test_01.J.out b/contrib/libxo/tests/core/saved/test_01.J.out
index 3fc12a173148..1577ce0c0410 100644
--- a/contrib/libxo/tests/core/saved/test_01.J.out
+++ b/contrib/libxo/tests/core/saved/test_01.J.out
@@ -1,2 +1,2 @@
-{"top": {"host":"my-box","domain":"example.com","host":"my-box","domain":"example.com","label":"value","max-chaos":"very","min-chaos":42,"some-chaos":"[42]","host":"my-box","domain":"example.com", "data": {"item": [{"sku":"GRO-000-415","name":"gum","sold":1412,"in-stock":54,"on-order":10}, {"sku":"HRD-000-212","name":"rope","sold":85,"in-stock":4,"on-order":2}, {"sku":"HRD-000-517","name":"ladder","sold":0,"in-stock":2,"on-order":1}, {"sku":"HRD-000-632","name":"bolt","sold":4123,"in-stock":144,"on-order":42}, {"sku":"GRO-000-2331","name":"water","sold":17,"in-stock":14,"on-order":2}]}, "data2": {"item": [{"sku":"GRO-000-415","name":"gum","sold":1412.0,"in-stock":54,"on-order":10}, {"sku":"HRD-000-212","name":"rope","sold":85.0,"in-stock":4,"on-order":2}, {"sku":"HRD-000-517","name":"ladder","sold":0,"in-stock":2,"on-order":1}, {"sku":"HRD-000-632","name":"bolt","sold":4123.0,"in-stock":144,"on-order":42}, {"sku":"GRO-000-2331","name":"water","sold":17.0,"in-stock":14,"on-order":2}]}, "data3": {"item": [{"sku":"GRO-000-533","name":"fish","sold":1321.0,"in-stock":45,"on-order":1}]}, "data4": {"item": ["gum","rope","ladder","bolt","water"]},"cost":425,"cost":455,"mode":"mode","mode_octal":"octal","links":"links","user":"user","group":"group","mode":"/some/file","mode_octal":640,"links":1,"user":"user","group":"group"}
+{"top": {"kve_start":"0xdeadbeef","kve_end":"0xcabb1e","host":"my-box","domain":"example.com","host":"my-box","domain":"example.com","label":"value","max-chaos":"very","min-chaos":42,"some-chaos":"[42]","host":"my-box","domain":"example.com", "data": {"item": [{"sku":"GRO-000-415","name":"gum","sold":1412,"in-stock":54,"on-order":10}, {"sku":"HRD-000-212","name":"rope","sold":85,"in-stock":4,"on-order":2}, {"sku":"HRD-000-517","name":"ladder","sold":0,"in-stock":2,"on-order":1}, {"sku":"HRD-000-632","name":"bolt","sold":4123,"in-stock":144,"on-order":42}, {"sku":"GRO-000-2331","name":"water","sold":17,"in-stock":14,"on-order":2}]}, "data2": {"item": [{"sku":"GRO-000-415","name":"gum","sold":1412.0,"in-stock":54,"on-order":10}, {"sku":"HRD-000-212","name":"rope","sold":85.0,"in-stock":4,"on-order":2}, {"sku":"HRD-000-517","name":"ladder","sold":0,"in-stock":2,"on-order":1}, {"sku":"HRD-000-632","name":"bolt","sold":4123.0,"in-stock":144,"on-order":42}, {"sku":"GRO-000-2331","name":"water","sold":17.0,"in-stock":14,"on-order":2}]}, "data3": {"item": [{"sku":"GRO-000-533","name":"fish","sold":1321.0,"in-stock":45,"on-order":1}]}, "data4": {"item": ["gum","rope","ladder","bolt","water"]},"cost":425,"cost":455,"mode":"mode","mode_octal":"octal","links":"links","user":"user","group":"group","mode":"/some/file","mode_octal":640,"links":1,"user":"user","group":"group"}
}
diff --git a/contrib/libxo/tests/core/saved/test_01.JP.out b/contrib/libxo/tests/core/saved/test_01.JP.out
index 2c7397f5e20a..d24abbc0254f 100644
--- a/contrib/libxo/tests/core/saved/test_01.JP.out
+++ b/contrib/libxo/tests/core/saved/test_01.JP.out
@@ -1,5 +1,7 @@
{
"top": {
+ "kve_start": "0xdeadbeef",
+ "kve_end": "0xcabb1e",
"host": "my-box",
"domain": "example.com",
"host": "my-box",
diff --git a/contrib/libxo/tests/core/saved/test_01.X.out b/contrib/libxo/tests/core/saved/test_01.X.out
index da80e681b27b..a243ce7c79f1 100644
--- a/contrib/libxo/tests/core/saved/test_01.X.out
+++ b/contrib/libxo/tests/core/saved/test_01.X.out
@@ -1 +1 @@
-<top><host>my-box</host><domain>example.com</domain><host>my-box</host><domain>example.com</domain><label>value</label><max-chaos>very</max-chaos><min-chaos>42</min-chaos><some-chaos>[42]</some-chaos><host>my-box</host><domain>example.com</domain><data test="value"><item test2="value2"><sku test3="value3" key="key">GRO-000-415</sku><name key="key">gum</name><sold>1412</sold><in-stock>54</in-stock><on-order>10</on-order></item><item><sku test3="value3" key="key">HRD-000-212</sku><name key="key">rope</name><sold>85</sold><in-stock>4</in-stock><on-order>2</on-order></item><item><sku test3="value3" key="key">HRD-000-517</sku><name key="key">ladder</name><sold>0</sold><in-stock>2</in-stock><on-order>1</on-order></item><item><sku test3="value3" key="key">HRD-000-632</sku><name key="key">bolt</name><sold>4123</sold><in-stock>144</in-stock><on-order>42</on-order></item><item><sku test3="value3" key="key">GRO-000-2331</sku><name key="key">water</name><sold>17</sold><in-stock>14</in-stock><on-order>2</on-order></item></data><data2><item><sku key="key">GRO-000-415</sku><name key="key">gum</name><sold>1412.0</sold><in-stock>54</in-stock><on-order>10</on-order></item><item><sku key="key">HRD-000-212</sku><name key="key">rope</name><sold>85.0</sold><in-stock>4</in-stock><on-order>2</on-order></item><item><sku key="key">HRD-000-517</sku><name key="key">ladder</name><sold>0</sold><in-stock>2</in-stock><on-order>1</on-order></item><item><sku key="key">HRD-000-632</sku><name key="key">bolt</name><sold>4123.0</sold><in-stock>144</in-stock><on-order>42</on-order></item><item><sku key="key">GRO-000-2331</sku><name key="key">water</name><sold>17.0</sold><in-stock>14</in-stock><on-order>2</on-order></item></data2><data3><item><sku key="key">GRO-000-533</sku><name key="key">fish</name><sold>1321.0</sold><in-stock>45</in-stock><on-order>1</on-order></item></data3><data4><item test4="value4">gum</item><item test4="value4">rope</item><item test4="value4">ladder</item><item test4="value4">bolt</item><item test4="value4">water</item></data4><cost>425</cost><cost>455</cost><mode>mode</mode><mode_octal>octal</mode_octal><links>links</links><user>user</user><group>group</group><mode>/some/file</mode><mode_octal>640</mode_octal><links>1</links><user>user</user><group>group</group></top> \ No newline at end of file
+<top><kve_start>0xdeadbeef</kve_start><kve_end>0xcabb1e</kve_end><host>my-box</host><domain>example.com</domain><host>my-box</host><domain>example.com</domain><label>value</label><max-chaos>very</max-chaos><min-chaos>42</min-chaos><some-chaos>[42]</some-chaos><host>my-box</host><domain>example.com</domain><data test="value"><item test2="value2"><sku test3="value3" key="key">GRO-000-415</sku><name key="key">gum</name><sold>1412</sold><in-stock>54</in-stock><on-order>10</on-order></item><item><sku test3="value3" key="key">HRD-000-212</sku><name key="key">rope</name><sold>85</sold><in-stock>4</in-stock><on-order>2</on-order></item><item><sku test3="value3" key="key">HRD-000-517</sku><name key="key">ladder</name><sold>0</sold><in-stock>2</in-stock><on-order>1</on-order></item><item><sku test3="value3" key="key">HRD-000-632</sku><name key="key">bolt</name><sold>4123</sold><in-stock>144</in-stock><on-order>42</on-order></item><item><sku test3="value3" key="key">GRO-000-2331</sku><name key="key">water</name><sold>17</sold><in-stock>14</in-stock><on-order>2</on-order></item></data><data2><item><sku key="key">GRO-000-415</sku><name key="key">gum</name><sold>1412.0</sold><in-stock>54</in-stock><on-order>10</on-order></item><item><sku key="key">HRD-000-212</sku><name key="key">rope</name><sold>85.0</sold><in-stock>4</in-stock><on-order>2</on-order></item><item><sku key="key">HRD-000-517</sku><name key="key">ladder</name><sold>0</sold><in-stock>2</in-stock><on-order>1</on-order></item><item><sku key="key">HRD-000-632</sku><name key="key">bolt</name><sold>4123.0</sold><in-stock>144</in-stock><on-order>42</on-order></item><item><sku key="key">GRO-000-2331</sku><name key="key">water</name><sold>17.0</sold><in-stock>14</in-stock><on-order>2</on-order></item></data2><data3><item><sku key="key">GRO-000-533</sku><name key="key">fish</name><sold>1321.0</sold><in-stock>45</in-stock><on-order>1</on-order></item></data3><data4><item test4="value4">gum</item><item test4="value4">rope</item><item test4="value4">ladder</item><item test4="value4">bolt</item><item test4="value4">water</item></data4><cost>425</cost><cost>455</cost><mode>mode</mode><mode_octal>octal</mode_octal><links>links</links><user>user</user><group>group</group><mode>/some/file</mode><mode_octal>640</mode_octal><links>1</links><user>user</user><group>group</group></top> \ No newline at end of file
diff --git a/contrib/libxo/tests/core/saved/test_01.XP.out b/contrib/libxo/tests/core/saved/test_01.XP.out
index c331dceafe62..98dc13b68f29 100644
--- a/contrib/libxo/tests/core/saved/test_01.XP.out
+++ b/contrib/libxo/tests/core/saved/test_01.XP.out
@@ -1,4 +1,6 @@
<top>
+ <kve_start>0xdeadbeef</kve_start>
+ <kve_end>0xcabb1e</kve_end>
<host>my-box</host>
<domain>example.com</domain>
<host>my-box</host>
diff --git a/contrib/libxo/tests/core/saved/test_10.X.out b/contrib/libxo/tests/core/saved/test_10.X.out
index 49c6dd88c4fd..c9321566d907 100644
--- a/contrib/libxo/tests/core/saved/test_10.X.out
+++ b/contrib/libxo/tests/core/saved/test_10.X.out
@@ -1 +1 @@
-<top __version="3.1.4"><data test="value"><data test2="value2">bold</data><data>bold-ul</data><data>triple</data><data>inv-ul</data><data>underline</data><data>plain</data><item><sku test3="value3" key="key">GRO-000-415</sku><name key="key">gum</name><sold>1412</sold><in-stock>54</in-stock><on-order>10</on-order></item><item><sku test3="value3" key="key">HRD-000-212</sku><name key="key">rope</name><sold>85</sold><in-stock>4</in-stock><on-order>2</on-order></item><item><sku test3="value3" key="key">HRD-000-517</sku><name key="key">ladder</name><sold>0</sold><in-stock>2</in-stock><on-order>1</on-order></item><item><sku test3="value3" key="key">HRD-000-632</sku><name key="key">bolt</name><sold>4123</sold><in-stock>144</in-stock><on-order>42</on-order></item><item><sku test3="value3" key="key">GRO-000-2331</sku><name key="key">water</name><sold>17</sold><in-stock>14</in-stock><on-order>2</on-order></item></data><data><item><sku key="key">GRO-000-415</sku><name key="key">gum</name><sold>1412.0</sold><in-stock>54</in-stock><on-order>10</on-order></item><item><sku key="key">HRD-000-212</sku><name key="key">rope</name><sold>85.0</sold><in-stock>4</in-stock><on-order>2</on-order></item><item><sku key="key">HRD-000-517</sku><name key="key">ladder</name><sold>0</sold><in-stock>2</in-stock><on-order>1</on-order></item><item><sku key="key">HRD-000-632</sku><name key="key">bolt</name><sold>4123.0</sold><in-stock>144</in-stock><on-order>42</on-order></item><item><sku key="key">GRO-000-2331</sku><name key="key">water</name><sold>17.0</sold><in-stock>14</in-stock><on-order>2</on-order></item></data><data><item><sku key="key">GRO-000-533</sku><name key="key">fish</name><sold>1321.0</sold><in-stock>45</in-stock><on-order>1</on-order></item></data><data><item test4="value4">gum</item><item test4="value4">rope</item><item test4="value4">ladder</item><item test4="value4">bolt</item><item test4="value4">water</item></data><cost>425</cost><cost>455</cost></top> \ No newline at end of file
+<top version="3.1.4"><data test="value"><data test2="value2">bold</data><data>bold-ul</data><data>triple</data><data>inv-ul</data><data>underline</data><data>plain</data><item><sku test3="value3" key="key">GRO-000-415</sku><name key="key">gum</name><sold>1412</sold><in-stock>54</in-stock><on-order>10</on-order></item><item><sku test3="value3" key="key">HRD-000-212</sku><name key="key">rope</name><sold>85</sold><in-stock>4</in-stock><on-order>2</on-order></item><item><sku test3="value3" key="key">HRD-000-517</sku><name key="key">ladder</name><sold>0</sold><in-stock>2</in-stock><on-order>1</on-order></item><item><sku test3="value3" key="key">HRD-000-632</sku><name key="key">bolt</name><sold>4123</sold><in-stock>144</in-stock><on-order>42</on-order></item><item><sku test3="value3" key="key">GRO-000-2331</sku><name key="key">water</name><sold>17</sold><in-stock>14</in-stock><on-order>2</on-order></item></data><data><item><sku key="key">GRO-000-415</sku><name key="key">gum</name><sold>1412.0</sold><in-stock>54</in-stock><on-order>10</on-order></item><item><sku key="key">HRD-000-212</sku><name key="key">rope</name><sold>85.0</sold><in-stock>4</in-stock><on-order>2</on-order></item><item><sku key="key">HRD-000-517</sku><name key="key">ladder</name><sold>0</sold><in-stock>2</in-stock><on-order>1</on-order></item><item><sku key="key">HRD-000-632</sku><name key="key">bolt</name><sold>4123.0</sold><in-stock>144</in-stock><on-order>42</on-order></item><item><sku key="key">GRO-000-2331</sku><name key="key">water</name><sold>17.0</sold><in-stock>14</in-stock><on-order>2</on-order></item></data><data><item><sku key="key">GRO-000-533</sku><name key="key">fish</name><sold>1321.0</sold><in-stock>45</in-stock><on-order>1</on-order></item></data><data><item test4="value4">gum</item><item test4="value4">rope</item><item test4="value4">ladder</item><item test4="value4">bolt</item><item test4="value4">water</item></data><cost>425</cost><cost>455</cost></top> \ No newline at end of file
diff --git a/contrib/libxo/tests/core/saved/test_10.XP.out b/contrib/libxo/tests/core/saved/test_10.XP.out
index 33c88d96214f..ec1aa93c7512 100644
--- a/contrib/libxo/tests/core/saved/test_10.XP.out
+++ b/contrib/libxo/tests/core/saved/test_10.XP.out
@@ -1,4 +1,4 @@
-<top __version="3.1.4">
+<top version="3.1.4">
<data test="value">
<data test2="value2">bold</data>
<data>bold-ul</data>
diff --git a/contrib/libxo/tests/core/saved/test_11.X.out b/contrib/libxo/tests/core/saved/test_11.X.out
index bb73a4293c9a..5c279b73b151 100644
--- a/contrib/libxo/tests/core/saved/test_11.X.out
+++ b/contrib/libxo/tests/core/saved/test_11.X.out
@@ -14,4 +14,4 @@
{{test-program: }}
{{An application 1011 log entry}}
-<top __version="3.1.4"></top> \ No newline at end of file
+<top version="3.1.4"></top> \ No newline at end of file
diff --git a/contrib/libxo/tests/core/saved/test_11.XP.out b/contrib/libxo/tests/core/saved/test_11.XP.out
index 46b5dd079ee5..02765614e9ab 100644
--- a/contrib/libxo/tests/core/saved/test_11.XP.out
+++ b/contrib/libxo/tests/core/saved/test_11.XP.out
@@ -14,5 +14,5 @@
{{test-program: }}
{{An application 1011 log entry}}
-<top __version="3.1.4">
+<top version="3.1.4">
</top>
diff --git a/contrib/libxo/tests/core/test_01.c b/contrib/libxo/tests/core/test_01.c
index 05d778a0bca4..a3a6a4be3e29 100644
--- a/contrib/libxo/tests/core/test_01.c
+++ b/contrib/libxo/tests/core/test_01.c
@@ -9,6 +9,7 @@
*/
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <unistd.h>
@@ -79,6 +80,9 @@ main (int argc, char **argv)
xo_open_container_h(NULL, "top");
+ xo_emit("{e:kve_start/%#jx}", (uintmax_t) 0xdeadbeef);
+ xo_emit("{e:kve_end/%#jx}", (uintmax_t) 0xcabb1e);
+
xo_emit("testing argument modifier {a:}.{a:}...\n",
"host", "my-box", "domain", "example.com");
diff --git a/contrib/libxo/tests/gettext/saved/gt_01.J.out b/contrib/libxo/tests/gettext/saved/gt_01.J.out
index 86527d149a6d..e6c2dd0e0798 100644
--- a/contrib/libxo/tests/gettext/saved/gt_01.J.out
+++ b/contrib/libxo/tests/gettext/saved/gt_01.J.out
@@ -1,2 +1,2 @@
-{"top": {"adjective":"amingflay","noun":"ordsway","verb":"urningbay","owner":"ymay","target":"ouchcay","adjective":"amingflay","noun":"ordsway","verb":"urningbay","owner":"ymay","target":"ouchcay", "bytes": [0,1,2,3,4],"total":1234,"received":1234,"from":"foop","port":4321,"time":32,"received":1234,"from":"foop","port":4321,"time":32,"received":1234,"from":"foop","port":4321,"time":32,"marzlevanes":3,"version":"1.2.3","date":"Tue Jun 23 18:47:09 UTC 2015", "__warning": {"program":"gt_01.test","message":"Nableuay otay ectulatobjay orwardfay elocipingvay","verb":ectulatobjay,"error":"Ermissionpay eniedday"}, "__warning": {"program":"gt_01.test","message":"automaticyay ynchronizationsay ofyay ardinalyay ammetersgray ailedfay","style":automaticyay,"type":"ardinalyay","target":"ammetersgray","error":"Ermissionpay eniedday"},"marzlevanes":6,"windings":"otuslay-oyay-eltayay"}
+{"top": {"adjective":"amingflay","noun":"ordsway","verb":"urningbay","owner":"ymay","target":"ouchcay","adjective":"amingflay","noun":"ordsway","verb":"urningbay","owner":"ymay","target":"ouchcay", "bytes": [0,1,2,3,4],"total":1234,"received":1234,"from":"foop","port":4321,"time":32,"received":1234,"from":"foop","port":4321,"time":32,"received":1234,"from":"foop","port":4321,"time":32,"marzlevanes":3,"version":"1.2.3","date":"Tue Jun 23 18:47:09 UTC 2015", "__warning": {"program":"gt_01.test","message":"Nableuay otay ectulatobjay orwardfay elocipingvay","verb":ectulatobjay,"error":"Ermissionpay eniedday"}, "__warning": {"program":"gt_01.test","message":"automaticyay ynchronizationsay ofyay ardinalyay ammetersgray ailedfay","style":"automaticyay","type":"ardinalyay","target":"ammetersgray","error":"Ermissionpay eniedday"},"marzlevanes":6,"windings":"otuslay-oyay-eltayay"}
}
diff --git a/contrib/libxo/tests/gettext/saved/gt_01.JP.out b/contrib/libxo/tests/gettext/saved/gt_01.JP.out
index 537ab213cb7c..6fcfcd6189f1 100644
--- a/contrib/libxo/tests/gettext/saved/gt_01.JP.out
+++ b/contrib/libxo/tests/gettext/saved/gt_01.JP.out
@@ -42,7 +42,7 @@
"__warning": {
"program": "gt_01.test",
"message": "automaticyay ynchronizationsay ofyay ardinalyay ammetersgray ailedfay",
- "style": automaticyay,
+ "style": "automaticyay",
"type": "ardinalyay",
"target": "ammetersgray",
"error": "Ermissionpay eniedday"