forked from mbj4668/pyang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests to ensure issue 230 is corrected
- Loading branch information
1 parent
f1f6d50
commit 927063c
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
DIRS = $(shell for d in test_* ; \ | ||
do [ -d $$d -a -f $$d/Makefile ] && echo $$d ; done) | ||
|
||
test: subdirs | ||
|
||
subdirs: | ||
for d in $(DIRS); do \ | ||
( cd $$d && $(MAKE) test ) || exit 1; \ | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
test: | ||
PYANG_PLUGINPATH=. pyang -f yin example-sports.yang \ | ||
-o example-sports.yin | ||
pyang -f tree --tree-path=sports/person/name example-sports.yang \ | ||
-o example-sports.tree | ||
pyang -f omni --omni-path=sports/person/name example-sports.yang \ | ||
-o example-sports.omni | ||
rm -f *.yin *.tree *.omni | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module example-sports { | ||
namespace "http://example.com/example-sports"; | ||
prefix sports; | ||
|
||
import ietf-yang-types { | ||
prefix yang; | ||
} | ||
|
||
container sports { | ||
config true; | ||
list person { | ||
key "name"; | ||
leaf name { | ||
type string; | ||
} | ||
leaf birthday { | ||
type yang:date-and-time; | ||
mandatory true; | ||
} | ||
} | ||
} | ||
} |