Removed space from xpath canonical form of relex/unionex
This commit is contained in:
parent
b1e5e8548a
commit
91313b31e0
2 changed files with 8 additions and 5 deletions
|
|
@ -290,11 +290,14 @@ xpath_tree2cbuf(xpath_tree *xs,
|
||||||
switch (xs->xs_type){
|
switch (xs->xs_type){
|
||||||
case XP_AND: /* and or */
|
case XP_AND: /* and or */
|
||||||
case XP_ADD: /* div mod + * - */
|
case XP_ADD: /* div mod + * - */
|
||||||
case XP_RELEX: /* !=, >= <= < > = */
|
|
||||||
case XP_UNION:
|
|
||||||
if (xs->xs_c1)
|
if (xs->xs_c1)
|
||||||
cprintf(xcb, " %s ", clicon_int2str(xpopmap, xs->xs_int));
|
cprintf(xcb, " %s ", clicon_int2str(xpopmap, xs->xs_int));
|
||||||
break;
|
break;
|
||||||
|
case XP_RELEX: /* !=, >= <= < > = */
|
||||||
|
case XP_UNION: /* | */
|
||||||
|
if (xs->xs_c1)
|
||||||
|
cprintf(xcb, "%s", clicon_int2str(xpopmap, xs->xs_int));
|
||||||
|
break;
|
||||||
case XP_PATHEXPR:
|
case XP_PATHEXPR:
|
||||||
/* [19] PathExpr ::= | FilterExpr '/' RelativeLocationPath
|
/* [19] PathExpr ::= | FilterExpr '/' RelativeLocationPath
|
||||||
| FilterExpr '//' RelativeLocationPath
|
| FilterExpr '//' RelativeLocationPath
|
||||||
|
|
|
||||||
|
|
@ -48,13 +48,13 @@ new "xpath canonical form (other)"
|
||||||
expectpart "$($clixon_util_xpath -c -y $ydir -p /i:x/j:y -n i:urn:example:a -n j:urn:example:b)" 0 '/a:x/b:y' '0 : a = "urn:example:a"' '1 : b = "urn:example:b"'
|
expectpart "$($clixon_util_xpath -c -y $ydir -p /i:x/j:y -n i:urn:example:a -n j:urn:example:b)" 0 '/a:x/b:y' '0 : a = "urn:example:a"' '1 : b = "urn:example:b"'
|
||||||
|
|
||||||
new "xpath canonical form predicate 1"
|
new "xpath canonical form predicate 1"
|
||||||
expectpart "$($clixon_util_xpath -c -y $ydir -p "/i:x[j:y='e1']" -n i:urn:example:a -n j:urn:example:b)" 0 "/a:x\[b:y = 'e1'\]" '0 : a = "urn:example:a"' '1 : b = "urn:example:b"'
|
expectpart "$($clixon_util_xpath -c -y $ydir -p "/i:x[j:y='e1']" -n i:urn:example:a -n j:urn:example:b)" 0 "/a:x\[b:y='e1'\]" '0 : a = "urn:example:a"' '1 : b = "urn:example:b"'
|
||||||
|
|
||||||
new "xpath canonical form predicate self"
|
new "xpath canonical form predicate self"
|
||||||
expectpart "$($clixon_util_xpath -c -y $ydir -p "/i:x[.='42']" -n i:urn:example:a -n j:urn:example:b)" 0 "/a:x\[. = '42'\]" '0 : a = "urn:example:a"'
|
expectpart "$($clixon_util_xpath -c -y $ydir -p "/i:x[.='42']" -n i:urn:example:a -n j:urn:example:b)" 0 "/a:x\[.='42'\]" '0 : a = "urn:example:a"'
|
||||||
|
|
||||||
new "xpath canonical form descendants"
|
new "xpath canonical form descendants"
|
||||||
expectpart "$($clixon_util_xpath -c -y $ydir -p "//x[.='42']" -n null:urn:example:a -n j:urn:example:b)" 0 "//a:x\[. = '42'\]" '0 : a = "urn:example:a"'
|
expectpart "$($clixon_util_xpath -c -y $ydir -p "//x[.='42']" -n null:urn:example:a -n j:urn:example:b)" 0 "//a:x\[.='42'\]" '0 : a = "urn:example:a"'
|
||||||
|
|
||||||
new "xpath canonical form (no default should fail)"
|
new "xpath canonical form (no default should fail)"
|
||||||
expectpart "$($clixon_util_xpath -c -y $ydir -p /x/j:y -n i:urn:example:a -n j:urn:example:b 2> /dev/null)" 255
|
expectpart "$($clixon_util_xpath -c -y $ydir -p /x/j:y -n i:urn:example:a -n j:urn:example:b 2> /dev/null)" 255
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue