diff options
Diffstat (limited to 'contrib/libxo/tests/xo')
-rw-r--r-- | contrib/libxo/tests/xo/Makefile.am | 3 | ||||
-rw-r--r-- | contrib/libxo/tests/xo/saved/xo_01.H.out | 2 | ||||
-rw-r--r-- | contrib/libxo/tests/xo/saved/xo_01.HIPx.out | 24 | ||||
-rw-r--r-- | contrib/libxo/tests/xo/saved/xo_01.HP.out | 24 | ||||
-rw-r--r-- | contrib/libxo/tests/xo/saved/xo_01.J.out | 2 | ||||
-rw-r--r-- | contrib/libxo/tests/xo/saved/xo_01.JP.out | 16 | ||||
-rw-r--r-- | contrib/libxo/tests/xo/saved/xo_01.T.out | 4 | ||||
-rw-r--r-- | contrib/libxo/tests/xo/saved/xo_01.X.out | 2 | ||||
-rw-r--r-- | contrib/libxo/tests/xo/saved/xo_01.XP.out | 16 | ||||
-rwxr-xr-x | contrib/libxo/tests/xo/xo_01.sh | 8 |
10 files changed, 95 insertions, 6 deletions
diff --git a/contrib/libxo/tests/xo/Makefile.am b/contrib/libxo/tests/xo/Makefile.am index 1687f09..22698f8 100644 --- a/contrib/libxo/tests/xo/Makefile.am +++ b/contrib/libxo/tests/xo/Makefile.am @@ -51,8 +51,7 @@ all: XO=../../xo/xo TEST_ONE = \ - LIBXO_OPTIONS=:W$$fmt \ - ${CHECKER} sh ${srcdir}/$$base.sh ${XO} ${TEST_OPTS} \ + ${CHECKER} sh ${srcdir}/$$base.sh "${XO} --libxo:W$$fmt" ${TEST_OPTS} \ > out/$$base.$$fmt.out 2> out/$$base.$$fmt.err ; \ ${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.out out/$$base.$$fmt.out ${S2O} ; \ ${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.err out/$$base.$$fmt.err ${S2O} diff --git a/contrib/libxo/tests/xo/saved/xo_01.H.out b/contrib/libxo/tests/xo/saved/xo_01.H.out index dd82a1c..6d115c9 100644 --- a/contrib/libxo/tests/xo/saved/xo_01.H.out +++ b/contrib/libxo/tests/xo/saved/xo_01.H.out @@ -1 +1 @@ -<div class="line"><div class="text">Item </div><div class="data" data-tag="name">one</div><div class="text"> is </div><div class="label">number</div><div class="padding"> </div><div class="data" data-tag="value">001</div><div class="text">, </div><div class="label">color</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="color">red</div></div><div class="line"><div class="text">Item </div><div class="data" data-tag="name">two</div><div class="text"> is </div><div class="label">number</div><div class="padding"> </div><div class="data" data-tag="value">002</div><div class="text">, </div><div class="label">color</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="color">blue</div></div><div class="line"><div class="text">Item </div><div class="data" data-tag="name">three</div><div class="text"> is </div><div class="label">number</div><div class="padding"> </div><div class="data" data-tag="value">003</div><div class="text">, </div><div class="label">color</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="color">green</div></div><div class="line"><div class="text">Item </div><div class="data" data-tag="name">four</div><div class="text"> is </div><div class="label">number</div><div class="padding"> </div><div class="data" data-tag="value">004</div><div class="text">, </div><div class="label">color</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="color">yellow</div></div>
\ No newline at end of file +<div class="line"><div class="text">Item </div><div class="data" data-tag="name">one</div><div class="text"> is </div><div class="label">number</div><div class="padding"> </div><div class="data" data-tag="value">001</div><div class="text">, </div><div class="label">color</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="color">red</div></div><div class="line"><div class="text">Item </div><div class="data" data-tag="name">two</div><div class="text"> is </div><div class="label">number</div><div class="padding"> </div><div class="data" data-tag="value">002</div><div class="text">, </div><div class="label">color</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="color">blue</div></div><div class="line"><div class="text">Item </div><div class="data" data-tag="name">three</div><div class="text"> is </div><div class="label">number</div><div class="padding"> </div><div class="data" data-tag="value">003</div><div class="text">, </div><div class="label">color</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="color">green</div></div><div class="line"><div class="text">Item </div><div class="data" data-tag="name">four</div><div class="text"> is </div><div class="label">number</div><div class="padding"> </div><div class="data" data-tag="value">004</div><div class="text">, </div><div class="label">color</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="color">yellow</div></div><div class="padding"> </div><div class="line"><div class="data" data-tag="address">0xdeadbeef</div><div class="text">..</div><div class="data" data-tag="foo">1</div></div><div class="padding"> </div><div class="line"><div class="data" data-tag="address">0xdeadbeef</div><div class="text">..</div><div class="data" data-tag="foo">1</div></div><div class="padding"> </div><div class="line"><div class="data" data-tag="address">0xdeadbeef</div><div class="text">..</div><div class="data" data-tag="foo">1</div></div><div class="padding"> </div><div class="line"><div class="data" data-tag="address">0xdeadbeef</div><div class="text">..</div><div class="data" data-tag="foo">1</div></div>
\ No newline at end of file diff --git a/contrib/libxo/tests/xo/saved/xo_01.HIPx.out b/contrib/libxo/tests/xo/saved/xo_01.HIPx.out index 12e36b1..66ba7b6 100644 --- a/contrib/libxo/tests/xo/saved/xo_01.HIPx.out +++ b/contrib/libxo/tests/xo/saved/xo_01.HIPx.out @@ -50,3 +50,27 @@ <div class="padding"> </div> <div class="data" data-tag="color" data-xpath="/top/item[name = 'four']/color">yellow</div> </div> + <div class="padding"> </div> +<div class="line"> + <div class="data" data-tag="address" data-xpath="/anchor/address">0xdeadbeef</div> + <div class="text">..</div> + <div class="data" data-tag="foo" data-xpath="/anchor/foo">1</div> +</div> + <div class="padding"> </div> +<div class="line"> + <div class="data" data-tag="address" data-xpath="/anchor/address">0xdeadbeef</div> + <div class="text">..</div> + <div class="data" data-tag="foo" data-xpath="/anchor/foo">1</div> +</div> + <div class="padding"> </div> +<div class="line"> + <div class="data" data-tag="address" data-xpath="/anchor/address">0xdeadbeef</div> + <div class="text">..</div> + <div class="data" data-tag="foo" data-xpath="/anchor/foo">1</div> +</div> + <div class="padding"> </div> +<div class="line"> + <div class="data" data-tag="address" data-xpath="/anchor/address">0xdeadbeef</div> + <div class="text">..</div> + <div class="data" data-tag="foo" data-xpath="/anchor/foo">1</div> +</div> diff --git a/contrib/libxo/tests/xo/saved/xo_01.HP.out b/contrib/libxo/tests/xo/saved/xo_01.HP.out index de91936..2bda085 100644 --- a/contrib/libxo/tests/xo/saved/xo_01.HP.out +++ b/contrib/libxo/tests/xo/saved/xo_01.HP.out @@ -50,3 +50,27 @@ <div class="padding"> </div> <div class="data" data-tag="color">yellow</div> </div> + <div class="padding"> </div> +<div class="line"> + <div class="data" data-tag="address">0xdeadbeef</div> + <div class="text">..</div> + <div class="data" data-tag="foo">1</div> +</div> + <div class="padding"> </div> +<div class="line"> + <div class="data" data-tag="address">0xdeadbeef</div> + <div class="text">..</div> + <div class="data" data-tag="foo">1</div> +</div> + <div class="padding"> </div> +<div class="line"> + <div class="data" data-tag="address">0xdeadbeef</div> + <div class="text">..</div> + <div class="data" data-tag="foo">1</div> +</div> + <div class="padding"> </div> +<div class="line"> + <div class="data" data-tag="address">0xdeadbeef</div> + <div class="text">..</div> + <div class="data" data-tag="foo">1</div> +</div> diff --git a/contrib/libxo/tests/xo/saved/xo_01.J.out b/contrib/libxo/tests/xo/saved/xo_01.J.out index 86ce4ef..7bf4226 100644 --- a/contrib/libxo/tests/xo/saved/xo_01.J.out +++ b/contrib/libxo/tests/xo/saved/xo_01.J.out @@ -1 +1 @@ -"top": {"item": {"name":"one","value":1,"color":"red"}, "item": {"name":"two","value":2,"color":"blue"}, "item": {"name":"three","value":3,"color":"green"}, "item": {"name":"four","value":4,"color":"yellow"}} +"top": {"item": {"name":"one","value":1,"color":"red"}, "item": {"name":"two","value":2,"color":"blue"}, "item": {"name":"three","value":3,"color":"green"}, "item": {"name":"four","value":4,"color":"yellow"}, "anchor": {"address":"0xdeadbeef","foo":1}, "anchor": {"address":"0xdeadbeef","foo":1}, "anchor": {"address":"0xdeadbeef","foo":1}, "anchor": {"address":"0xdeadbeef","foo":1}} diff --git a/contrib/libxo/tests/xo/saved/xo_01.JP.out b/contrib/libxo/tests/xo/saved/xo_01.JP.out index 5a25b17..95ac0e2 100644 --- a/contrib/libxo/tests/xo/saved/xo_01.JP.out +++ b/contrib/libxo/tests/xo/saved/xo_01.JP.out @@ -18,5 +18,21 @@ "name": "four", "value": 4, "color": "yellow" + }, + "anchor": { + "address": "0xdeadbeef", + "foo": 1 + }, + "anchor": { + "address": "0xdeadbeef", + "foo": 1 + }, + "anchor": { + "address": "0xdeadbeef", + "foo": 1 + }, + "anchor": { + "address": "0xdeadbeef", + "foo": 1 } } diff --git a/contrib/libxo/tests/xo/saved/xo_01.T.out b/contrib/libxo/tests/xo/saved/xo_01.T.out index ed2ea35..8b67427 100644 --- a/contrib/libxo/tests/xo/saved/xo_01.T.out +++ b/contrib/libxo/tests/xo/saved/xo_01.T.out @@ -2,3 +2,7 @@ Item one is number 001, color: red Item two is number 002, color: blue Item three is number 003, color: green Item four is number 004, color: yellow + 0xdeadbeef..1 + 0xdeadbeef..1 + 0xdeadbeef..1 + 0xdeadbeef..1 diff --git a/contrib/libxo/tests/xo/saved/xo_01.X.out b/contrib/libxo/tests/xo/saved/xo_01.X.out index 7539566..ffe77fa 100644 --- a/contrib/libxo/tests/xo/saved/xo_01.X.out +++ b/contrib/libxo/tests/xo/saved/xo_01.X.out @@ -1 +1 @@ -<top><item><name>one</name><value>1</value><color>red</color></item><item><name>two</name><value>2</value><color>blue</color></item><item><name>three</name><value>3</value><color>green</color></item><item><name>four</name><value>4</value><color>yellow</color></item></top>
\ No newline at end of file +<top><item><name>one</name><value>1</value><color>red</color></item><item><name>two</name><value>2</value><color>blue</color></item><item><name>three</name><value>3</value><color>green</color></item><item><name>four</name><value>4</value><color>yellow</color></item><anchor><address>0xdeadbeef</address><foo>1</foo></anchor><anchor><address>0xdeadbeef</address><foo>1</foo></anchor><anchor><address>0xdeadbeef</address><foo>1</foo></anchor><anchor><address>0xdeadbeef</address><foo>1</foo></anchor></top>
\ No newline at end of file diff --git a/contrib/libxo/tests/xo/saved/xo_01.XP.out b/contrib/libxo/tests/xo/saved/xo_01.XP.out index 7f069c8..a9d3951 100644 --- a/contrib/libxo/tests/xo/saved/xo_01.XP.out +++ b/contrib/libxo/tests/xo/saved/xo_01.XP.out @@ -19,4 +19,20 @@ <value>4</value> <color>yellow</color> </item> + <anchor> + <address>0xdeadbeef</address> + <foo>1</foo> + </anchor> + <anchor> + <address>0xdeadbeef</address> + <foo>1</foo> + </anchor> + <anchor> + <address>0xdeadbeef</address> + <foo>1</foo> + </anchor> + <anchor> + <address>0xdeadbeef</address> + <foo>1</foo> + </anchor> </top> diff --git a/contrib/libxo/tests/xo/xo_01.sh b/contrib/libxo/tests/xo/xo_01.sh index 8de9410..504f175 100755 --- a/contrib/libxo/tests/xo/xo_01.sh +++ b/contrib/libxo/tests/xo/xo_01.sh @@ -24,4 +24,10 @@ for i in one:1:red two:2:blue three:3:green four:4:yellow ; do NF=--not-first done -${XO} --close top
\ No newline at end of file +XOAN="${XO} --wrap anchor --not-first --warn --depth 1" +${XOAN} "{[:18}{:address/%p}..{:foo/%u}{]:}\n" 0xdeadbeef 1 +${XOAN} "{[:/18}{:address/%p}..{:foo/%u}{]:}\n" 0xdeadbeef 1 +${XOAN} "{[:/%d}{:address/%p}..{:foo/%u}{]:}\n" 18 0xdeadbeef 1 +${XOAN} "{[:/%s}{:address/%p}..{:foo/%u}{]:}\n" 18 0xdeadbeef 1 + +${XO} --close top |