mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
170 lines
6.4 KiB
XML
170 lines
6.4 KiB
XML
<tests>
|
|
<simple>
|
|
<test verify="false">
|
|
<pattern><![CDATA[a<weak_warning descr="Single repetition">{1}</weak_warning>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test verify="false">
|
|
<pattern><![CDATA[<weak_warning descr="Redundant character escape">\;</weak_warning>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost">
|
|
<pattern>\b \b{g} \B \A \z \Z \G</pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
</simple>
|
|
<quantifiers>
|
|
<test verify="false">
|
|
<pattern><![CDATA[a<weak_warning descr="Repetition range replaceable by '?'">{0,1}</weak_warning>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test verify="false">
|
|
<pattern><![CDATA[a<weak_warning descr="Repetition range replaceable by '+'">{1,}</weak_warning>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test verify="false">
|
|
<pattern><![CDATA[a<weak_warning descr="Repetition range replaceable by '*'">{0,}</weak_warning>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test verify="false">
|
|
<pattern><![CDATA[a<weak_warning descr="Single repetition">{1}</weak_warning>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test verify="false">
|
|
<pattern><![CDATA[a<weak_warning descr="Fixed repetition range">{3,3}</weak_warning>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
</quantifiers>
|
|
<charclasses>
|
|
<test verify="false">
|
|
<pattern><![CDATA[[<warning descr="Redundant character range">\w-\w</warning>]]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost">
|
|
<pattern>\X</pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test>
|
|
<pattern><![CDATA[<weak_warning descr="Redundant character escape">\-</weak_warning>[<weak_warning descr="Redundant character escape">\*</weak_warning>\-\[\]\\<weak_warning descr="Redundant character escape">\+</weak_warning>]]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost">
|
|
<pattern>[\b]</pattern>
|
|
<expected>ERR</expected>
|
|
</test>
|
|
</charclasses>
|
|
|
|
<groups>
|
|
<test verify="false">
|
|
<pattern><![CDATA[<warning descr="Empty group">()</warning>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test verify="false">
|
|
<pattern><![CDATA[<warning descr="Empty group">(|)</warning>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test verify="false">
|
|
<pattern><![CDATA[<warning descr="Redundant group nesting">((a))</warning>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost">
|
|
<pattern>(?<asdf>[a-c])\1</pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost">
|
|
<pattern>(?<asdf>[a-c])\k<asdf></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost">
|
|
<pattern><![CDATA[\k<<error descr="Unresolved named group reference">adsf</error>>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost" varify="false">
|
|
<pattern>(?<important_value1>\d\d)</pattern>
|
|
<expected>ERR</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost" varify="false">
|
|
<pattern>(?<importantValue1>\d\d)</pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
</groups>
|
|
<escapes>
|
|
<test verify="false">
|
|
<pattern><![CDATA[[<warning descr="Redundant character range">a-a</warning>]]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test verify="false">
|
|
<pattern><![CDATA[[<error descr="Illegal character range (to < from)">\x4a-\x3f</error>]]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test verify="false">
|
|
<pattern><![CDATA[[<error descr="Illegal character range (to < from)">\udbff\udfff-\ud800\udc00</error>]]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test verify="false">
|
|
<pattern><![CDATA[[<error descr="Illegal character range (to < from)">z-a</error>]]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test>
|
|
<pattern><![CDATA[[\Qabc?*+.)<warning descr="Duplicate character ')' in character class">)</warning>]<warning descr="Duplicate character ']' in character class">]</warning>[<warning descr="Duplicate character ']' in character class">]</warning>\E]]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost">
|
|
<pattern>]}</pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost">
|
|
<pattern><![CDATA[<weak_warning descr="Redundant character escape">\]</weak_warning><weak_warning descr="Redundant character escape">\}</weak_warning>]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
</escapes>
|
|
|
|
<namedchars>
|
|
<test verify="false">
|
|
<pattern>^\p{javaJavaIdentifierStart}+\p{javaJavaIdentifierPart}+$</pattern>
|
|
<expected>ERR</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost">
|
|
<pattern>^\p{javaJavaIdentifierStart}+\p{javaJavaIdentifierPart}+$</pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test host="com.intellij.psi.impl.JavaRegExpHost">
|
|
<pattern>\p{InArabiC}\p{IsTitleCase}\p{IsAlphabetic}\p{all}\p{IsGreeK}</pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
<test>
|
|
<pattern><![CDATA[[:xdig<warning descr="Duplicate character 'i' in character class">i</warning>t<warning descr="Duplicate character ':' in character class">:</warning>]+]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
</namedchars>
|
|
<backrefs>
|
|
<test verify="false">
|
|
<pattern><![CDATA[([ab]+=<warning descr="Back reference is nested into the capturing group it refers to">\1</warning>)]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
</backrefs>
|
|
|
|
<regressions>
|
|
<!-- caused NPE in Annotator -->
|
|
<test>
|
|
<pattern>(</pattern>
|
|
<expected>ERR</expected>
|
|
</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>
|
|
</options>
|
|
|
|
|
|
<bug id="IDEA-25680">
|
|
<test verify="false">
|
|
<pattern><![CDATA[a<weak_warning descr="Redundant character escape">\ </weak_warning>b]]></pattern>
|
|
<expected>OK</expected>
|
|
</test>
|
|
</bug>
|
|
</tests>
|