BUG-2022: String Type pattern parsing and resolving fix.
[yangtools.git] / yang / yang-parser-impl / src / test / resources / model / foo.yang
index 2426e3c7d576136e283042068c77595ccefd2511..98ee7f2d91122a68f5db6c312c9655a113a7ef30 100644 (file)
@@ -13,6 +13,8 @@ module foo {
         revision-date 2013-02-27;
     }
 
+    include subfoo;
+
     organization "opendaylight";
     contact "http://www.opendaylight.org/";
 
@@ -20,6 +22,10 @@ module foo {
         reference " WILL BE DEFINED LATER";
     }
 
+    typedef identifier {
+        type int32;
+    }
+
     leaf int32-leaf {
         type br:int32-ext2 {
             range "12..max";
@@ -30,6 +36,28 @@ module foo {
         type br:string-ext4;
     }
 
+    leaf invalid-pattern-string-leaf {
+        type br:invalid-string-pattern;
+    }
+
+    leaf invalid-direct-string-pattern-def-leaf {
+        type string {
+            pattern "[[A-1*-%22!^^}";
+        }
+    }
+
+    leaf multiple-pattern-string-leaf {
+        type br:multiple-pattern-string;
+    }
+
+    leaf multiple-pattern-direct-string-def-leaf {
+        type string {
+            pattern "[e-z]*";
+            pattern "[[A-1*-%22!^^}";
+            pattern "[a-d]*";
+        }
+    }
+
     leaf length-leaf {
         type br:string-ext2 {
             length "7..max";