--- /dev/null
+module correct-list-keys-test {
+ yang-version 1;
+ namespace "correct-list-keys-test";
+ prefix "test";
+
+ list valid-list-a {
+ leaf a1 {
+ type string;
+ }
+ leaf a2 {
+ when "../a1 = 'key-a1'";
+ type int32;
+ }
+ key "a1 test:a2";
+ }
+
+ list valid-list-b {
+ key "b";
+ leaf b {
+ if-feature feature-b;
+ type string;
+ }
+ }
+
+ grouping d {
+ leaf d1 {
+ type int32;
+ if-feature feature-d;
+ }
+ leaf d2 {
+ when "../d1 = '2'";
+ type string;
+ }
+ }
+
+ list valid-list-d1 {
+ key d1;
+ uses d;
+ }
+
+ list valid-list-d2 {
+ key test:d2;
+ uses d;
+ }
+}