BUG-2022: String Type pattern parsing and resolving fix.
[yangtools.git] / yang / yang-parser-impl / src / test / resources / model / foo.yang
index 768574cde4d0023acb5d40b6787d1f663c1b35d5..98ee7f2d91122a68f5db6c312c9655a113a7ef30 100644 (file)
@@ -22,6 +22,10 @@ module foo {
         reference " WILL BE DEFINED LATER";
     }
 
+    typedef identifier {
+        type int32;
+    }
+
     leaf int32-leaf {
         type br:int32-ext2 {
             range "12..max";
@@ -32,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";