Skip to content

Commit

Permalink
added test for leafrefs
Browse files Browse the repository at this point in the history
  • Loading branch information
mbj4668 committed Nov 1, 2023
1 parent ce52857 commit 050c6cc
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/test_issues/test_i193/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
test: test1 test2
test: test1 test2 test3

test1:
$(PYANG) -Werror x-base.yang

test2:
$(PYANG) -Werror y-base.yang

test3:
$(PYANG) -Werror z-base.yang
7 changes: 7 additions & 0 deletions test/test_issues/test_i193/z-base.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module z-base {
yang-version 1.1;
namespace "http://example.com/z-base";
prefix z-b;
include z-base2;
include z-profiles;
}
13 changes: 13 additions & 0 deletions test/test_issues/test_i193/z-base2.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
submodule z-base2 {
yang-version 1.1;
belongs-to z-base {
prefix z-b;
}
container configs {
container profiles {
leaf foo {
type string;
}
}
}
}
16 changes: 16 additions & 0 deletions test/test_issues/test_i193/z-profiles.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
submodule z-profiles {
yang-version 1.1;
belongs-to z-base {
prefix z-b;
}
augment "/z-b:configs/z-b:profiles" {
list profile {
key name;
leaf name {
type leafref {
path "../../foo";
}
}
}
}
}

0 comments on commit 050c6cc

Please sign in to comment.