Skip to content

Commit

Permalink
Add tests to ensure issue 230 is corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed May 18, 2016
1 parent f1f6d50 commit 927063c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test_issues/Makefile
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

9 changes: 9 additions & 0 deletions test/test_issues/test_i230/Makefile
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

22 changes: 22 additions & 0 deletions test/test_issues/test_i230/example-sports.yang
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;
}
}
}
}

0 comments on commit 927063c

Please sign in to comment.