Bug 8831 - Yang 1.1 default values are not checked correctly
[yangtools.git] / yang / yang-parser-impl / src / test / resources / bugs / bug8831 / invalid / inv-model.yang
diff --git a/yang/yang-parser-impl/src/test/resources/bugs/bug8831/invalid/inv-model.yang b/yang/yang-parser-impl/src/test/resources/bugs/bug8831/invalid/inv-model.yang
new file mode 100644 (file)
index 0000000..6b8e724
--- /dev/null
@@ -0,0 +1,29 @@
+module inv-model {
+    yang-version 1.1;
+    namespace "http://www.inv-model.com";
+    prefix ex;
+
+    revision 2017-07-10;
+
+    feature my-feature {
+        description "my feature";
+    }
+
+    typedef enum-last {
+        type union {
+            type uint16;
+            type enumeration {
+                enum "any" {
+                    if-feature my-feature;
+                }
+            }
+        }
+    }
+
+    container top {
+        leaf enum-last-leaf {
+            type enum-last;
+            default "any";
+        }
+    }
+}