clixon/test/test_yang_parse.sh
Olof hagsand a4e29bcdb7 * All yang modules are stored in the clicon_dbspec_yang() option.
* Except clixon-config module due to bug reported below
* Bug: Top-level Yang symbol cannot be called "config" in any imported yang file.
  * datastore uses "config" as reserved keyword for storing any XML whoich collides with code for detecting Yang sanit
2018-10-19 15:26:22 +02:00

25 lines
462 B
Bash
Executable file

#!/bin/bash
# Test: YANG parser tests
#PROG="valgrind --leak-check=full --show-leak-kinds=all ../util/clixon_util_yang"
PROG=../util/clixon_util_yang
# include err() and new() functions and creates $dir
. ./lib.sh
YANG=$(cat <<EOF
module test{
prefix ex;
extension c-define {
description "Example from RFC 6020";
argument "name";
}
ex:not-defined ARGUMENT;;
}
EOF
)
new "yang parse"
expecteof "$PROG" 0 "$YANG" "^$YANG$"
rm -rf $dir