diff options
author | phil <phil@FreeBSD.org> | 2016-04-15 18:46:15 +0000 |
---|---|---|
committer | phil <phil@FreeBSD.org> | 2016-04-15 18:46:15 +0000 |
commit | ec6357ca208a98134a4c3a92b27cc6f8036a057f (patch) | |
tree | a8954be7f37694064eb0351a1cd9919c64c26cf8 /contrib/libxo/tests | |
parent | a723f9781d16f16c6f7af1cc7c6118663291ba0b (diff) | |
parent | f46a90ac38b5c37ca11e2f3abca36be64182ef03 (diff) | |
download | FreeBSD-src-ec6357ca208a98134a4c3a92b27cc6f8036a057f.zip FreeBSD-src-ec6357ca208a98134a4c3a92b27cc6f8036a057f.tar.gz |
Import to 0.6.1
0.5.0:
document "trim" modifier
add xo_emit_field functions
Add xo_set_file{,_h} functions
Fix LIBXO_* variables; add -L and -I as needed
add --disable-silent-rules and an explicit make; s/PACKAGE-NAME/PACKAGE_NAME/; add /download/ to 'url'
fix silliness where xo_flush_h emitted closing tag (html); make the caller (xo_message) do it
flush after transitions; fix flush call in xo_do_emit
mkdir the version-specific packaging dir
use "XO_" instead of LIBXO_
0.6.0:
Add --with-retain-size to set the size (in bits) of the retain hash buckets
Add The Argument Modifier ({a:})
Add retain and no-retain to --libxo
autoconf: Add test for monitor.h
Document quote heuristic
go deep with nroff backslashes
Use "ULL" for 32 bit check
add xo_retain_clear and xo_retain_clear_all
docs: combine two 'handles' section; move command line argument section
handle GETTEXT when msgfmt isn't where it's supposed to be (FreeBSD)
make 'retain' a flag (XOEF_RETAIN) instead of a role; it's simpler, and doesn't feel as tacky. "{R:}" was painful to document, which means it's painful to use.
new xo_emit_f functions
nuke some unused UNUSEDs
test code: path must be static
update test cases
0.6.1:
fix version number (missed a commit during new-release)
Reviewed by: sjg
Approved by: sjg (mentor)
Diffstat (limited to 'contrib/libxo/tests')
32 files changed, 774 insertions, 5 deletions
diff --git a/contrib/libxo/tests/core/Makefile.am b/contrib/libxo/tests/core/Makefile.am index 0131a6f..7e61f55 100644 --- a/contrib/libxo/tests/core/Makefile.am +++ b/contrib/libxo/tests/core/Makefile.am @@ -22,7 +22,8 @@ test_07.c \ test_08.c \ test_09.c \ test_10.c \ -test_11.c +test_11.c \ +test_12.c test_01_test_SOURCES = test_01.c test_02_test_SOURCES = test_02.c @@ -35,6 +36,7 @@ test_08_test_SOURCES = test_08.c test_09_test_SOURCES = test_09.c test_10_test_SOURCES = test_10.c test_11_test_SOURCES = test_11.c +test_12_test_SOURCES = test_12.c # TEST_CASES := $(shell cd ${srcdir} ; echo *.c ) diff --git a/contrib/libxo/tests/core/saved/test_01.E.out b/contrib/libxo/tests/core/saved/test_01.E.out index ed615a5..de23baa 100644 --- a/contrib/libxo/tests/core/saved/test_01.E.out +++ b/contrib/libxo/tests/core/saved/test_01.E.out @@ -2,6 +2,14 @@ op create: [] [] op open_container: [top] [] op string: [host] [my-box] op string: [domain] [example.com] +op string: [host] [my-box] +op string: [domain] [example.com] +op string: [label] [value] +op string: [max-chaos] [very] +op content: [min-chaos] [42] +op string: [some-chaos] [[42]] +op string: [host] [my-box] +op string: [domain] [example.com] op attr: [test] [value] op open_container: [data] [] op open_list: [item] [] diff --git a/contrib/libxo/tests/core/saved/test_01.H.out b/contrib/libxo/tests/core/saved/test_01.H.out index 39d8bd4..7c0b3de 100644 --- a/contrib/libxo/tests/core/saved/test_01.H.out +++ b/contrib/libxo/tests/core/saved/test_01.H.out @@ -1 +1,2 @@ -<div class="line"><div class="text">Connecting to </div><div class="data" data-tag="host">my-box</div><div class="text">.</div><div class="data" data-tag="domain">example.com</div><div class="text">...</div></div><div class="line"><div class="title">Item </div><div class="title"> Total Sold</div><div class="title"> In Stock</div><div class="title"> On Order</div><div class="title"> SKU</div></div><div class="line"><div class="data" data-tag="name" data-key="key">gum </div><div class="data" data-tag="sold"> 1412</div><div class="data" data-tag="in-stock"> 54</div><div class="data" data-tag="on-order"> 10</div><div class="data" data-tag="sku" data-key="key"> GRO-000-415</div></div><div class="line"><div class="data" data-tag="name" data-key="key">rope </div><div class="data" data-tag="sold"> 85</div><div class="data" data-tag="in-stock"> 4</div><div class="data" data-tag="on-order"> 2</div><div class="data" data-tag="sku" data-key="key"> HRD-000-212</div></div><div class="line"><div class="data" data-tag="name" data-key="key">ladder </div><div class="data" data-tag="sold"> 0</div><div class="data" data-tag="in-stock"> 2</div><div class="data" data-tag="on-order"> 1</div><div class="data" data-tag="sku" data-key="key"> HRD-000-517</div></div><div class="line"><div class="data" data-tag="name" data-key="key">bolt </div><div class="data" data-tag="sold"> 4123</div><div class="data" data-tag="in-stock"> 144</div><div class="data" data-tag="on-order"> 42</div><div class="data" data-tag="sku" data-key="key"> HRD-000-632</div></div><div class="line"><div class="data" data-tag="name" data-key="key">water </div><div class="data" data-tag="sold"> 17</div><div class="data" data-tag="in-stock"> 14</div><div class="data" data-tag="on-order"> 2</div><div class="data" data-tag="sku" data-key="key"> GRO-000-2331</div></div><div class="line"></div><div class="line"></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">gum</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">1412.0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">54</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">10</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">GRO-000-415</div></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">rope</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">85.0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">4</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">2</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">HRD-000-212</div></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">ladder</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">2</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">1</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">HRD-000-517</div></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">bolt</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">4123.0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">144</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">42</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">HRD-000-632</div></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">water</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">17.0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">14</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">2</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">GRO-000-2331</div></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">fish</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">1321.0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">45</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">1</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">GRO-000-533</div></div><div class="line"><div class="label">Item</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="item">gum</div></div><div class="line"><div class="label">Item</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="item">rope</div></div><div class="line"><div class="label">Item</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="item">ladder</div></div><div class="line"><div class="label">Item</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="item">bolt</div></div><div class="line"><div class="label">Item</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="item">water</div></div><div class="line"><div class="text">X</div><div class="text">X</div><div class="text">X</div><div class="text">X</div><div class="text">X</div><div class="text">X</div><div class="text">X</div><div class="text">X</div></div><div class="line"><div class="text">X</div><div class="padding"> </div><div class="text">X</div><div class="label">Cost</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="cost">425</div></div><div class="line"><div class="text">X</div><div class="padding"> </div><div class="text">X</div><div class="label">Cost</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="cost">455</div></div><div class="line"><div class="text"> </div><div class="data" data-tag="links">links</div><div class="text"> </div><div class="data" data-tag="user">user</div><div class="text"> </div><div class="data" data-tag="group">group</div><div class="text"> </div></div><div class="line"><div class="data" data-tag="mode">/some/file</div><div class="text"> </div><div class="data" data-tag="links"> 1</div><div class="text"> </div><div class="data" data-tag="user">user </div><div class="text"> </div><div class="data" data-tag="group">group </div><div class="text"> </div></div>
\ No newline at end of file +<div class="line"><div class="text">testing argument modifier </div><div class="data" data-tag="host">my-box</div><div class="text">.</div><div class="data" data-tag="domain">example.com</div><div class="text">...</div></div><div class="line"><div class="text">testing argument modifier with encoding to </div><div class="text">.</div><div class="data" data-tag="domain">example.com</div><div class="text">...</div></div><div class="line"><div class="label">Label text</div><div class="text"> </div><div class="data" data-tag="label">value</div></div><div class="line"><div class="data" data-tag="max-chaos"> very </div><div class="data" data-tag="min-chaos">42</div><div class="data" data-tag="some-chaos">42 +</div><div class="text">Connecting to </div><div class="data" data-tag="host">my-box</div><div class="text">.</div><div class="data" data-tag="domain">example.com</div><div class="text">...</div></div><div class="line"><div class="title">Item </div><div class="title"> Total Sold</div><div class="title"> In Stock</div><div class="title"> On Order</div><div class="title"> SKU</div></div><div class="line"><div class="data" data-tag="name" data-key="key">gum </div><div class="data" data-tag="sold"> 1412</div><div class="data" data-tag="in-stock"> 54</div><div class="data" data-tag="on-order"> 10</div><div class="data" data-tag="sku" data-key="key"> GRO-000-415</div></div><div class="line"><div class="data" data-tag="name" data-key="key">rope </div><div class="data" data-tag="sold"> 85</div><div class="data" data-tag="in-stock"> 4</div><div class="data" data-tag="on-order"> 2</div><div class="data" data-tag="sku" data-key="key"> HRD-000-212</div></div><div class="line"><div class="data" data-tag="name" data-key="key">ladder </div><div class="data" data-tag="sold"> 0</div><div class="data" data-tag="in-stock"> 2</div><div class="data" data-tag="on-order"> 1</div><div class="data" data-tag="sku" data-key="key"> HRD-000-517</div></div><div class="line"><div class="data" data-tag="name" data-key="key">bolt </div><div class="data" data-tag="sold"> 4123</div><div class="data" data-tag="in-stock"> 144</div><div class="data" data-tag="on-order"> 42</div><div class="data" data-tag="sku" data-key="key"> HRD-000-632</div></div><div class="line"><div class="data" data-tag="name" data-key="key">water </div><div class="data" data-tag="sold"> 17</div><div class="data" data-tag="in-stock"> 14</div><div class="data" data-tag="on-order"> 2</div><div class="data" data-tag="sku" data-key="key"> GRO-000-2331</div></div><div class="line"></div><div class="line"></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">gum</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">1412.0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">54</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">10</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">GRO-000-415</div></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">rope</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">85.0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">4</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">2</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">HRD-000-212</div></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">ladder</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">2</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">1</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">HRD-000-517</div></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">bolt</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">4123.0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">144</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">42</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">HRD-000-632</div></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">water</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">17.0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">14</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">2</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">GRO-000-2331</div></div><div class="line"><div class="label">Item</div><div class="text"> '</div><div class="data" data-tag="name" data-key="key">fish</div><div class="text">':</div></div><div class="line"><div class="padding"> </div><div class="label">Total sold</div><div class="text">: </div><div class="data" data-tag="sold">1321.0</div></div><div class="line"><div class="padding"> </div><div class="label">In stock</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="in-stock">45</div></div><div class="line"><div class="padding"> </div><div class="label">On order</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="on-order">1</div></div><div class="line"><div class="padding"> </div><div class="label">SKU</div><div class="text">: </div><div class="data" data-tag="sku" data-key="key">GRO-000-533</div></div><div class="line"><div class="label">Item</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="item">gum</div></div><div class="line"><div class="label">Item</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="item">rope</div></div><div class="line"><div class="label">Item</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="item">ladder</div></div><div class="line"><div class="label">Item</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="item">bolt</div></div><div class="line"><div class="label">Item</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="item">water</div></div><div class="line"><div class="text">X</div><div class="text">X</div><div class="text">X</div><div class="text">X</div><div class="text">X</div><div class="text">X</div><div class="text">X</div><div class="text">X</div></div><div class="line"><div class="text">X</div><div class="padding"> </div><div class="text">X</div><div class="label">Cost</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="cost">425</div></div><div class="line"><div class="text">X</div><div class="padding"> </div><div class="text">X</div><div class="label">Cost</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="cost">455</div></div><div class="line"><div class="text"> </div><div class="data" data-tag="links">links</div><div class="text"> </div><div class="data" data-tag="user">user</div><div class="text"> </div><div class="data" data-tag="group">group</div><div class="text"> </div></div><div class="line"><div class="data" data-tag="mode">/some/file</div><div class="text"> </div><div class="data" data-tag="links"> 1</div><div class="text"> </div><div class="data" data-tag="user">user </div><div class="text"> </div><div class="data" data-tag="group">group </div><div class="text"> </div></div>
\ No newline at end of file diff --git a/contrib/libxo/tests/core/saved/test_01.HIPx.out b/contrib/libxo/tests/core/saved/test_01.HIPx.out index a3aa369..f6c7290 100644 --- a/contrib/libxo/tests/core/saved/test_01.HIPx.out +++ b/contrib/libxo/tests/core/saved/test_01.HIPx.out @@ -1,4 +1,26 @@ <div class="line"> + <div class="text">testing argument modifier </div> + <div class="data" data-tag="host" data-xpath="/top/host">my-box</div> + <div class="text">.</div> + <div class="data" data-tag="domain" data-xpath="/top/domain">example.com</div> + <div class="text">...</div> +</div> +<div class="line"> + <div class="text">testing argument modifier with encoding to </div> + <div class="text">.</div> + <div class="data" data-tag="domain" data-xpath="/top/domain">example.com</div> + <div class="text">...</div> +</div> +<div class="line"> + <div class="label">Label text</div> + <div class="text"> </div> + <div class="data" data-tag="label" data-xpath="/top/label">value</div> +</div> +<div class="line"> + <div class="data" data-tag="max-chaos" data-xpath="/top/max-chaos"> very </div> + <div class="data" data-tag="min-chaos" data-xpath="/top/min-chaos">42</div> + <div class="data" data-tag="some-chaos" data-xpath="/top/some-chaos">42 +</div> <div class="text">Connecting to </div> <div class="data" data-tag="host" data-xpath="/top/host">my-box</div> <div class="text">.</div> diff --git a/contrib/libxo/tests/core/saved/test_01.HP.out b/contrib/libxo/tests/core/saved/test_01.HP.out index c877dfd..0fdcbd1 100644 --- a/contrib/libxo/tests/core/saved/test_01.HP.out +++ b/contrib/libxo/tests/core/saved/test_01.HP.out @@ -1,4 +1,26 @@ <div class="line"> + <div class="text">testing argument modifier </div> + <div class="data" data-tag="host">my-box</div> + <div class="text">.</div> + <div class="data" data-tag="domain">example.com</div> + <div class="text">...</div> +</div> +<div class="line"> + <div class="text">testing argument modifier with encoding to </div> + <div class="text">.</div> + <div class="data" data-tag="domain">example.com</div> + <div class="text">...</div> +</div> +<div class="line"> + <div class="label">Label text</div> + <div class="text"> </div> + <div class="data" data-tag="label">value</div> +</div> +<div class="line"> + <div class="data" data-tag="max-chaos"> very </div> + <div class="data" data-tag="min-chaos">42</div> + <div class="data" data-tag="some-chaos">42 +</div> <div class="text">Connecting to </div> <div class="data" data-tag="host">my-box</div> <div class="text">.</div> diff --git a/contrib/libxo/tests/core/saved/test_01.J.out b/contrib/libxo/tests/core/saved/test_01.J.out index 0515a2a..3fc12a1 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", "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": {"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 210266d..2c7397f 100644 --- a/contrib/libxo/tests/core/saved/test_01.JP.out +++ b/contrib/libxo/tests/core/saved/test_01.JP.out @@ -2,6 +2,14 @@ "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": [ { diff --git a/contrib/libxo/tests/core/saved/test_01.T.out b/contrib/libxo/tests/core/saved/test_01.T.out index cdf704b..71cd130 100644 --- a/contrib/libxo/tests/core/saved/test_01.T.out +++ b/contrib/libxo/tests/core/saved/test_01.T.out @@ -1,3 +1,7 @@ +testing argument modifier my-box.example.com... +testing argument modifier with encoding to .example.com... +Label text value + very 4242 Connecting to my-box.example.com... Item Total Sold In Stock On Order SKU gum 1412 54 10 GRO-000-415 diff --git a/contrib/libxo/tests/core/saved/test_01.X.out b/contrib/libxo/tests/core/saved/test_01.X.out index bc9ef84..da80e68 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><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><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 f7d7e5c..c331dce 100644 --- a/contrib/libxo/tests/core/saved/test_01.XP.out +++ b/contrib/libxo/tests/core/saved/test_01.XP.out @@ -1,6 +1,14 @@ <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> diff --git a/contrib/libxo/tests/core/saved/test_12.E.err b/contrib/libxo/tests/core/saved/test_12.E.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.E.err diff --git a/contrib/libxo/tests/core/saved/test_12.E.out b/contrib/libxo/tests/core/saved/test_12.E.out new file mode 100644 index 0000000..1c899a1 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.E.out @@ -0,0 +1,89 @@ +op create: [] [] +op open_container: [top] [] +op open_container: [data] [] +op open_list: [thing] [] +op open_instance: [thing] [] +op string: [name] [thing] +op string: [color] [green] +op content: [time] [2:15] +op string: [hand] [left] +op string: [color] [blue] +op content: [time] [3:45] +op close_instance: [thing] [] +op open_instance: [thing] [] +op string: [name] [thing] +op string: [color] [green] +op content: [time] [2:15] +op string: [hand] [left] +op string: [color] [blue] +op content: [time] [3:45] +op close_instance: [thing] [] +op open_instance: [thing] [] +op string: [name] [thing] +op string: [color] [green] +op content: [time] [2:15] +op string: [hand] [left] +op string: [color] [blue] +op content: [time] [3:45] +op close_instance: [thing] [] +op open_instance: [thing] [] +op string: [name] [thing] +op string: [color] [green] +op content: [time] [2:15] +op string: [hand] [left] +op string: [color] [blue] +op content: [time] [3:45] +op close_instance: [thing] [] +op open_instance: [thing] [] +op string: [name] [thing] +op string: [color] [green] +op content: [time] [2:15] +op string: [hand] [left] +op string: [color] [blue] +op content: [time] [3:45] +op close_instance: [thing] [] +op open_instance: [thing] [] +op string: [name] [thing] +op string: [color] [green] +op content: [time] [2:15] +op string: [hand] [left] +op string: [color] [blue] +op content: [time] [3:45] +op close_instance: [thing] [] +op open_instance: [thing] [] +op string: [name] [thing] +op string: [color] [green] +op content: [time] [2:15] +op string: [hand] [left] +op string: [color] [blue] +op content: [time] [3:45] +op close_instance: [thing] [] +op open_instance: [thing] [] +op string: [name] [thing] +op string: [color] [green] +op content: [time] [2:15] +op string: [hand] [left] +op string: [color] [blue] +op content: [time] [3:45] +op close_instance: [thing] [] +op open_instance: [thing] [] +op string: [name] [thing] +op string: [color] [green] +op content: [time] [2:15] +op string: [hand] [left] +op string: [color] [blue] +op content: [time] [3:45] +op close_instance: [thing] [] +op open_instance: [thing] [] +op string: [name] [thing] +op string: [color] [green] +op content: [time] [2:15] +op string: [hand] [left] +op string: [color] [blue] +op content: [time] [3:45] +op close_instance: [thing] [] +op close_list: [thing] [] +op close_container: [data] [] +op close_container: [top] [] +op finish: [] [] +op flush: [] [] diff --git a/contrib/libxo/tests/core/saved/test_12.H.err b/contrib/libxo/tests/core/saved/test_12.H.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.H.err diff --git a/contrib/libxo/tests/core/saved/test_12.H.out b/contrib/libxo/tests/core/saved/test_12.H.out new file mode 100644 index 0000000..5cbac17 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.H.out @@ -0,0 +1 @@ +<div class="line"><div class="text">The </div><div class="data" data-tag="name">thing</div><div class="text"> is </div><div class="data" data-tag="color">green</div><div class="text"> til </div><div class="data" data-tag="time">02:15</div></div><div class="line"><div class="text">My </div><div class="data" data-tag="hand">left</div><div class="text"> hand is </div><div class="data" data-tag="color">blue</div><div class="text"> til </div><div class="data" data-tag="time">03:45</div></div><div class="line"><div class="text">The </div><div class="data" data-tag="name">thing</div><div class="text"> is </div><div class="data" data-tag="color">green</div><div class="text"> til </div><div class="data" data-tag="time">02:15</div></div><div class="line"><div class="text">My </div><div class="data" data-tag="hand">left</div><div class="text"> hand is </div><div class="data" data-tag="color">blue</div><div class="text"> til </div><div class="data" data-tag="time">03:45</div></div><div class="line"><div class="text">The </div><div class="data" data-tag="name">thing</div><div class="text"> is </div><div class="data" data-tag="color">green</div><div class="text"> til </div><div class="data" data-tag="time">02:15</div></div><div class="line"><div class="text">My </div><div class="data" data-tag="hand">left</div><div class="text"> hand is </div><div class="data" data-tag="color">blue</div><div class="text"> til </div><div class="data" data-tag="time">03:45</div></div><div class="line"><div class="text">The </div><div class="data" data-tag="name">thing</div><div class="text"> is </div><div class="data" data-tag="color">green</div><div class="text"> til </div><div class="data" data-tag="time">02:15</div></div><div class="line"><div class="text">My </div><div class="data" data-tag="hand">left</div><div class="text"> hand is </div><div class="data" data-tag="color">blue</div><div class="text"> til </div><div class="data" data-tag="time">03:45</div></div><div class="line"><div class="text">The </div><div class="data" data-tag="name">thing</div><div class="text"> is </div><div class="data" data-tag="color">green</div><div class="text"> til </div><div class="data" data-tag="time">02:15</div></div><div class="line"><div class="text">My </div><div class="data" data-tag="hand">left</div><div class="text"> hand is </div><div class="data" data-tag="color">blue</div><div class="text"> til </div><div class="data" data-tag="time">03:45</div></div><div class="line"><div class="text">The </div><div class="data" data-tag="name">thing</div><div class="text"> is </div><div class="data" data-tag="color">green</div><div class="text"> til </div><div class="data" data-tag="time">02:15</div></div><div class="line"><div class="text">My </div><div class="data" data-tag="hand">left</div><div class="text"> hand is </div><div class="data" data-tag="color">blue</div><div class="text"> til </div><div class="data" data-tag="time">03:45</div></div><div class="line"><div class="text">The </div><div class="data" data-tag="name">thing</div><div class="text"> is </div><div class="data" data-tag="color">green</div><div class="text"> til </div><div class="data" data-tag="time">02:15</div></div><div class="line"><div class="text">My </div><div class="data" data-tag="hand">left</div><div class="text"> hand is </div><div class="data" data-tag="color">blue</div><div class="text"> til </div><div class="data" data-tag="time">03:45</div></div><div class="line"><div class="text">The </div><div class="data" data-tag="name">thing</div><div class="text"> is </div><div class="data" data-tag="color">green</div><div class="text"> til </div><div class="data" data-tag="time">02:15</div></div><div class="line"><div class="text">My </div><div class="data" data-tag="hand">left</div><div class="text"> hand is </div><div class="data" data-tag="color">blue</div><div class="text"> til </div><div class="data" data-tag="time">03:45</div></div><div class="line"><div class="text">The </div><div class="data" data-tag="name">thing</div><div class="text"> is </div><div class="data" data-tag="color">green</div><div class="text"> til </div><div class="data" data-tag="time">02:15</div></div><div class="line"><div class="text">My </div><div class="data" data-tag="hand">left</div><div class="text"> hand is </div><div class="data" data-tag="color">blue</div><div class="text"> til </div><div class="data" data-tag="time">03:45</div></div><div class="line"><div class="text">The </div><div class="data" data-tag="name">thing</div><div class="text"> is </div><div class="data" data-tag="color">green</div><div class="text"> til </div><div class="data" data-tag="time">02:15</div></div><div class="line"><div class="text">My </div><div class="data" data-tag="hand">left</div><div class="text"> hand is </div><div class="data" data-tag="color">blue</div><div class="text"> til </div><div class="data" data-tag="time">03:45</div></div>
\ No newline at end of file diff --git a/contrib/libxo/tests/core/saved/test_12.HIPx.err b/contrib/libxo/tests/core/saved/test_12.HIPx.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.HIPx.err diff --git a/contrib/libxo/tests/core/saved/test_12.HIPx.out b/contrib/libxo/tests/core/saved/test_12.HIPx.out new file mode 100644 index 0000000..9b5fea1 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.HIPx.out @@ -0,0 +1,160 @@ +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div> +</div> diff --git a/contrib/libxo/tests/core/saved/test_12.HP.err b/contrib/libxo/tests/core/saved/test_12.HP.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.HP.err diff --git a/contrib/libxo/tests/core/saved/test_12.HP.out b/contrib/libxo/tests/core/saved/test_12.HP.out new file mode 100644 index 0000000..1e0e923 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.HP.out @@ -0,0 +1,160 @@ +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time">03:45</div> +</div> +<div class="line"> + <div class="text">The </div> + <div class="data" data-tag="name">thing</div> + <div class="text"> is </div> + <div class="data" data-tag="color">green</div> + <div class="text"> til </div> + <div class="data" data-tag="time">02:15</div> +</div> +<div class="line"> + <div class="text">My </div> + <div class="data" data-tag="hand">left</div> + <div class="text"> hand is </div> + <div class="data" data-tag="color">blue</div> + <div class="text"> til </div> + <div class="data" data-tag="time">03:45</div> +</div> diff --git a/contrib/libxo/tests/core/saved/test_12.J.err b/contrib/libxo/tests/core/saved/test_12.J.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.J.err diff --git a/contrib/libxo/tests/core/saved/test_12.J.out b/contrib/libxo/tests/core/saved/test_12.J.out new file mode 100644 index 0000000..118bb76 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.J.out @@ -0,0 +1,2 @@ +{"top": {"data": {"thing": [{"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}]}} +} diff --git a/contrib/libxo/tests/core/saved/test_12.JP.err b/contrib/libxo/tests/core/saved/test_12.JP.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.JP.err diff --git a/contrib/libxo/tests/core/saved/test_12.JP.out b/contrib/libxo/tests/core/saved/test_12.JP.out new file mode 100644 index 0000000..3e15e0d --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.JP.out @@ -0,0 +1,88 @@ +{ + "top": { + "data": { + "thing": [ + { + "name": "thing", + "color": "green", + "time": 2:15, + "hand": "left", + "color": "blue", + "time": 3:45 + }, + { + "name": "thing", + "color": "green", + "time": 2:15, + "hand": "left", + "color": "blue", + "time": 3:45 + }, + { + "name": "thing", + "color": "green", + "time": 2:15, + "hand": "left", + "color": "blue", + "time": 3:45 + }, + { + "name": "thing", + "color": "green", + "time": 2:15, + "hand": "left", + "color": "blue", + "time": 3:45 + }, + { + "name": "thing", + "color": "green", + "time": 2:15, + "hand": "left", + "color": "blue", + "time": 3:45 + }, + { + "name": "thing", + "color": "green", + "time": 2:15, + "hand": "left", + "color": "blue", + "time": 3:45 + }, + { + "name": "thing", + "color": "green", + "time": 2:15, + "hand": "left", + "color": "blue", + "time": 3:45 + }, + { + "name": "thing", + "color": "green", + "time": 2:15, + "hand": "left", + "color": "blue", + "time": 3:45 + }, + { + "name": "thing", + "color": "green", + "time": 2:15, + "hand": "left", + "color": "blue", + "time": 3:45 + }, + { + "name": "thing", + "color": "green", + "time": 2:15, + "hand": "left", + "color": "blue", + "time": 3:45 + } + ] + } + } +} diff --git a/contrib/libxo/tests/core/saved/test_12.T.err b/contrib/libxo/tests/core/saved/test_12.T.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.T.err diff --git a/contrib/libxo/tests/core/saved/test_12.T.out b/contrib/libxo/tests/core/saved/test_12.T.out new file mode 100644 index 0000000..6f777c7 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.T.out @@ -0,0 +1,20 @@ +The thing is green til 02:15 +My left hand is blue til 03:45 +The thing is green til 02:15 +My left hand is blue til 03:45 +The thing is green til 02:15 +My left hand is blue til 03:45 +The thing is green til 02:15 +My left hand is blue til 03:45 +The thing is green til 02:15 +My left hand is blue til 03:45 +The thing is green til 02:15 +My left hand is blue til 03:45 +The thing is green til 02:15 +My left hand is blue til 03:45 +The thing is green til 02:15 +My left hand is blue til 03:45 +The thing is green til 02:15 +My left hand is blue til 03:45 +The thing is green til 02:15 +My left hand is blue til 03:45 diff --git a/contrib/libxo/tests/core/saved/test_12.X.err b/contrib/libxo/tests/core/saved/test_12.X.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.X.err diff --git a/contrib/libxo/tests/core/saved/test_12.X.out b/contrib/libxo/tests/core/saved/test_12.X.out new file mode 100644 index 0000000..ed2d8e4 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.X.out @@ -0,0 +1 @@ +<top><data><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing></data></top>
\ No newline at end of file diff --git a/contrib/libxo/tests/core/saved/test_12.XP.err b/contrib/libxo/tests/core/saved/test_12.XP.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.XP.err diff --git a/contrib/libxo/tests/core/saved/test_12.XP.out b/contrib/libxo/tests/core/saved/test_12.XP.out new file mode 100644 index 0000000..73eec4c --- /dev/null +++ b/contrib/libxo/tests/core/saved/test_12.XP.out @@ -0,0 +1,84 @@ +<top> + <data> + <thing> + <name>thing</name> + <color>green</color> + <time>2:15</time> + <hand>left</hand> + <color>blue</color> + <time>3:45</time> + </thing> + <thing> + <name>thing</name> + <color>green</color> + <time>2:15</time> + <hand>left</hand> + <color>blue</color> + <time>3:45</time> + </thing> + <thing> + <name>thing</name> + <color>green</color> + <time>2:15</time> + <hand>left</hand> + <color>blue</color> + <time>3:45</time> + </thing> + <thing> + <name>thing</name> + <color>green</color> + <time>2:15</time> + <hand>left</hand> + <color>blue</color> + <time>3:45</time> + </thing> + <thing> + <name>thing</name> + <color>green</color> + <time>2:15</time> + <hand>left</hand> + <color>blue</color> + <time>3:45</time> + </thing> + <thing> + <name>thing</name> + <color>green</color> + <time>2:15</time> + <hand>left</hand> + <color>blue</color> + <time>3:45</time> + </thing> + <thing> + <name>thing</name> + <color>green</color> + <time>2:15</time> + <hand>left</hand> + <color>blue</color> + <time>3:45</time> + </thing> + <thing> + <name>thing</name> + <color>green</color> + <time>2:15</time> + <hand>left</hand> + <color>blue</color> + <time>3:45</time> + </thing> + <thing> + <name>thing</name> + <color>green</color> + <time>2:15</time> + <hand>left</hand> + <color>blue</color> + <time>3:45</time> + </thing> + <thing> + <name>thing</name> + <color>green</color> + <time>2:15</time> + <hand>left</hand> + <color>blue</color> + <time>3:45</time> + </thing> + </data> +</top> diff --git a/contrib/libxo/tests/core/test_01.c b/contrib/libxo/tests/core/test_01.c index 5c74877..05d778a 100644 --- a/contrib/libxo/tests/core/test_01.c +++ b/contrib/libxo/tests/core/test_01.c @@ -79,6 +79,18 @@ main (int argc, char **argv) xo_open_container_h(NULL, "top"); + xo_emit("testing argument modifier {a:}.{a:}...\n", + "host", "my-box", "domain", "example.com"); + + xo_emit("testing argument modifier with encoding to {ea:}.{a:}...\n", + "host", "my-box", "domain", "example.com"); + + xo_emit("{La:} {a:}\n", "Label text", "label", "value"); + + xo_emit_field("Vt", "max-chaos", NULL, NULL, " very "); + xo_emit_field("V", "min-chaos", "%d", NULL, 42); + xo_emit_field("V", "some-chaos", "%d\n", "[%d]", 42); + xo_emit("Connecting to {:host}.{:domain}...\n", "my-box", "example.com"); xo_attr("test", "value"); diff --git a/contrib/libxo/tests/core/test_02.c b/contrib/libxo/tests/core/test_02.c index abddcf2..9a02680 100644 --- a/contrib/libxo/tests/core/test_02.c +++ b/contrib/libxo/tests/core/test_02.c @@ -42,6 +42,7 @@ main (int argc, char **argv) } xo_set_flags(NULL, XOF_UNITS); /* Always test w/ this */ + xo_set_file(stdout); xo_open_container_h(NULL, "top"); diff --git a/contrib/libxo/tests/core/test_12.c b/contrib/libxo/tests/core/test_12.c new file mode 100644 index 0000000..17d26a6 --- /dev/null +++ b/contrib/libxo/tests/core/test_12.c @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2014, Juniper Networks, Inc. + * All rights reserved. + * This SOFTWARE is licensed under the LICENSE provided in the + * ../Copyright file. By downloading, installing, copying, or otherwise + * using the SOFTWARE, you agree to be bound by the terms of that + * LICENSE. + * Phil Shafer, July 2014 + */ + +#include <stdio.h> +#include <stdlib.h> +#include <stdint.h> +#include <string.h> + +#include "xo_config.h" +#include "xo.h" + +int +main (int argc, char **argv) +{ + int i, count = 10; + int mon = 0; + xo_emit_flags_t flags = XOEF_RETAIN; + + argc = xo_parse_args(argc, argv); + if (argc < 0) + return 1; + + for (argc = 1; argv[argc]; argc++) { + if (strcmp(argv[argc], "xml") == 0) + xo_set_style(NULL, XO_STYLE_XML); + else if (strcmp(argv[argc], "json") == 0) + xo_set_style(NULL, XO_STYLE_JSON); + else if (strcmp(argv[argc], "text") == 0) + xo_set_style(NULL, XO_STYLE_TEXT); + else if (strcmp(argv[argc], "html") == 0) + xo_set_style(NULL, XO_STYLE_HTML); + else if (strcmp(argv[argc], "pretty") == 0) + xo_set_flags(NULL, XOF_PRETTY); + else if (strcmp(argv[argc], "xpath") == 0) + xo_set_flags(NULL, XOF_XPATH); + else if (strcmp(argv[argc], "info") == 0) + xo_set_flags(NULL, XOF_INFO); + else if (strcmp(argv[argc], "no-retain") == 0) + flags &= ~XOEF_RETAIN; + else if (strcmp(argv[argc], "big") == 0) { + if (argv[argc + 1]) + count = atoi(argv[++argc]); + } + } + + xo_set_flags(NULL, XOF_UNITS); /* Always test w/ this */ + xo_set_file(stdout); + + xo_open_container("top"); + xo_open_container("data"); + + const char *fmt1 = "The {C:fg-red}{k:name}{C:reset} is " + "{C:/fg-%s}{:color}{C:reset} til {:time/%02d:%02d}\n"; + const char *fmt2 = "My {C:fg-red}{:hand}{C:reset} hand is " + "{C:/fg-%s}{:color}{C:reset} til {:time/%02d:%02d}\n"; + + for (i = 0; i < count; i++) { + xo_open_instance("thing"); + xo_emit_f(flags, fmt1, "thing", "green", "green", 2, 15); + xo_emit_f(flags, fmt2, "left", "blue", "blue", 3, 45); + } + + xo_close_container("data"); + xo_close_container_h(NULL, "top"); + + xo_finish(); + + return 0; +} diff --git a/contrib/libxo/tests/gettext/gt_01.c b/contrib/libxo/tests/gettext/gt_01.c index a0200c2..d636747 100644 --- a/contrib/libxo/tests/gettext/gt_01.c +++ b/contrib/libxo/tests/gettext/gt_01.c @@ -26,7 +26,7 @@ int main (int argc, char **argv) { static char domainname[] = "gt_01"; - char path[MAXPATHLEN]; + static char path[MAXPATHLEN]; const char *tzone = "EST"; const char *lang = "pig_latin"; |