Fixed: [XPath * stopped working in 7.3](https://github.com/clicon/clixon/issues/594)

This commit is contained in:
Olof hagsand 2025-03-02 11:09:34 +01:00
parent ed226a990c
commit 302762f5af
3 changed files with 25 additions and 3 deletions

View file

@ -143,6 +143,12 @@ module clixon-example {
type string;
}
}
container options {
leaf max-number {
type uint32;
default 50000;
}
}
}
}
EOF
@ -556,7 +562,7 @@ EOF
new "given value show key"
expectpart "$($clixon_util_xpath -D $DBG -f $dir/1.xml -n ex:urn:example:clixon -y $fyang < $dir/1.xpath)" 0 "<name>x</name>"
# See https://github.com/clicon/clixon/issues/594
cat <<EOF > $dir/1.xpath
/table/parameter[value='42']/value
EOF
@ -564,6 +570,20 @@ EOF
new "given value show value"
expectpart "$($clixon_util_xpath -D $DBG -f $dir/1.xml -n ex:urn:example:clixon -y $fyang < $dir/1.xpath)" 0 "<value>42</value>"
cat <<EOF > $dir/1.xml
<table xmlns="urn:example:clixon">
<options>
<max-number>50000</max-number>
</options>
</table>
EOF
new "xpath issue ok"
expectpart "$($clixon_util_xpath -D $DBG -f $dir/1.xml -n ex:urn:example:clixon -y $fyang -p "/ex:table/options/*")" 0 "<max-number>50000</max-number>"
new "xpath issue fail"
expectpart "$($clixon_util_xpath -D $DBG -f $dir/1.xml -n null:urn:ietf:params:xml:ns:netconf:base:1.0 -n ex:urn:example:clixon -y $fyang -p "/ex:table/ex:options/*")" 0 "<max-number>50000</max-number>"
rm -rf $dir
new "endtest"