regexp: test for inline options
authorBas Leijdekkers <basleijdekkers@gmail.com>
Tue, 14 Jun 2016 07:20:09 +0000 (10:20 +0300)
committerBas Leijdekkers <basleijdekkers@gmail.com>
Tue, 14 Jun 2016 07:20:41 +0000 (10:20 +0300)
RegExpSupport/test/org/intellij/lang/regexp/RegExpParseTest.java
RegExpSupport/testData/RETest.xml

index 7aa0738945220579f46b1f2345f33fb665a3ce4e..d9a06ed1fb33fabc9e282f0b57df8e7bf13804d7 100644 (file)
@@ -103,6 +103,10 @@ public class RegExpParseTest extends BaseParseTestCase {
     return super.getTestDataPath() + "/gen/";
   }
 
+  public void testOptions() throws Exception {
+    doTest("options/");
+  }
+
   public void testSimple() throws Exception {
     doTest("simple/");
   }
index 3e81b2ec2e897edb79b503c1cdac9d45e573eabd..12ec11dbd6e312f1bd544dc6151293f0e5dacaad 100644 (file)
     </test>
   </regressions>
 
+  <options>
+    <test host="com.intellij.psi.impl.JavaRegExpHost">
+      <pattern><![CDATA[(?i<error descr="Unknown inline option flag">Z</error>m)abc]]></pattern>
+      <expected>OK</expected>
+    </test>
+    <test host="com.intellij.psi.impl.JavaRegExpHost">
+      <pattern>(?idmsuxU)nice</pattern>
+      <expected>OK</expected>
+    </test>
+    <test host="com.intellij.psi.impl.JavaRegExpHost">
+      <pattern verify="false">(?idm-suxU)one(?suxU-idm)two</pattern>
+      <expected>OK</expected>
+    </test>
+  </options>
+
   <test>
     <pattern>abc)</pattern>
     <expected>ERR</expected>