Fixed: [CLI: Explicit api-path not encoded correctly](https://github.com/clicon/clixon/issues/504)
This commit is contained in:
parent
928d7d5b4d
commit
b13320f1a1
3 changed files with 24 additions and 9 deletions
|
|
@ -68,6 +68,7 @@ set x,cli_merge("/example:x");{
|
|||
a <a:string> b <b:string>,cli_merge("/example:x/m1=%s,%s/");{
|
||||
c <c:string>,cli_merge("/example:x/m1=%s,%s/c");
|
||||
}
|
||||
ax <a:string>("special case") c <c:string>,cli_merge("/example:x/m1=,%s/c");
|
||||
}
|
||||
# Negative
|
||||
err x,cli_set("/example2:x");{
|
||||
|
|
@ -105,6 +106,18 @@ expectpart "$($clixon_cli -1 -f $cfg set x a 22 b 33 c 55)" 0 ""
|
|||
new "show conf x"
|
||||
expectpart "$($clixon_cli -1 -f $cfg show conf x)" 0 "x m1 a 22 b 33"
|
||||
|
||||
new "set conf x, special case comma"
|
||||
expectpart "$($clixon_cli -1 -f $cfg set x ax 11 c 33)" 0 "^$"
|
||||
|
||||
new "show conf ax"
|
||||
expectpart "$($clixon_cli -1 -f $cfg show conf x)" 0 "x m1 a (null) b 11 c 33"
|
||||
|
||||
new "set conf x, special case comma encoding"
|
||||
expectpart "$($clixon_cli -1 -f $cfg set x ax 22/22 c 44)" 0 "^$"
|
||||
|
||||
new "show conf ax"
|
||||
expectpart "$($clixon_cli -1 -f $cfg show conf x)" 0 "x m1 a (null) b 22/22 c 44"
|
||||
|
||||
# Negative tests
|
||||
new "err x"
|
||||
expectpart "$($clixon_cli -1 -f $cfg -l n err x)" 255 "Config error: api-path syntax error \"/example2:x\": application unknown-element No such yang module prefix <bad-element>example2</bad-element>: Invalid argument"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue