Refactoring of if-feature parse code
Moved if-feature sub-parser to clixon_yang_parse_sub.[ch]
This commit is contained in:
parent
a846989569
commit
89f8567f75
13 changed files with 182 additions and 96 deletions
|
|
@ -9,7 +9,7 @@ APPNAME=example
|
|||
# include err() and new() functions and creates $dir
|
||||
|
||||
cfg=$dir/conf_yang.xml
|
||||
fspec=$dir/automode.cli
|
||||
clispec=$dir/automode.cli
|
||||
fin=$dir/in
|
||||
fstate=$dir/state.xml
|
||||
fyang=$dir/clixon-example.yang
|
||||
|
|
@ -65,7 +65,7 @@ module clixon-example2 {
|
|||
}
|
||||
EOF
|
||||
|
||||
cat <<EOF > $fspec
|
||||
cat <<EOF > $clispec
|
||||
CLICON_MODE="example";
|
||||
CLICON_PROMPT="%U@%H %W> ";
|
||||
CLICON_PLUGIN="example_cli";
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ function checklog(){
|
|||
if [ -z "$t" ]; then
|
||||
echo -e "\e[31m\nError in Test$testnr [$testname]:"
|
||||
if [ $# -gt 0 ]; then
|
||||
echo "Not found in log"
|
||||
echo "Not found \"$s\" on line $l0"
|
||||
echo
|
||||
fi
|
||||
echo -e "\e[0m"
|
||||
|
|
@ -126,7 +126,7 @@ if [ $BE -ne 0 ]; then
|
|||
err
|
||||
fi
|
||||
new "start backend -s init -f $cfg -l f$flog -- -t -v /x/y[a=$errnr]"
|
||||
start_backend -s init -f $cfg -l f$flog -- -t -v /x/y[a=$errnr] # -t means transaction logging
|
||||
start_backend -s init -f $cfg -l f$flog -- -t -v "/x/y[a='$errnr']" # -t means transaction logging
|
||||
fi
|
||||
|
||||
new "wait backend"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue