<rule id='TEM_PARTICIPIO-PASSADO' name='Tem + Particípio passado'>
<!-- Created by Marco A.G.Pinto, Portuguese rule - 2020-09-16 (2-JUL-2020+) -->
<pattern>
<marker>
<token>tem</token>
<token postag='VMP00SM' postag_regexp='no'/>
</marker>
</pattern>
<message>Substitua por <suggestion><match no='2' regexp_match='VMP00SM' regexp_replace='VMIP3S0'/></suggestion>.</message>
<example correction='pesquisa'>O professor <marker>tem pesquisado</marker> o assunto há décadas.</example>
</rule>
But TESTRULES PT gives an error:
Exception in thread “main” org.languagetool.rules.patterns.PatternRuleTest$PatternRuleTestFailure: Test failure for rule TEM_PARTICIPIO-PASSADO[1] in file /org/languagetool/rules/pt/grammar.xml: Incorrect suggestions: Expected ‘pesquisa’, got: ‘pesquisado’ on input: ‘O professor tem pesquisado o assunto há décadas.’
at org.languagetool.rules.patterns.PatternRuleTest.assertSuggestions(PatternRuleTest.java:525)
at org.languagetool.rules.patterns.PatternRuleTest.testBadSentences(PatternRuleTest.java:417)
at org.languagetool.rules.patterns.PatternRuleTest.testGrammarRulesFromXML(PatternRuleTest.java:318)
at org.languagetool.rules.patterns.PatternRuleTest.runTestForLanguage(PatternRuleTest.java:169)
at org.languagetool.rules.patterns.PatternRuleTest.runGrammarRulesFromXmlTestIgnoringLanguages(PatternRuleTest.java:152)
at org.languagetool.rules.patterns.PatternRuleTest.main(PatternRuleTest.java:683)
<rule id='TEM_PARTICIPIO-PASSADO' name='Tem + Particípio passado'>
<!-- Created by Marco A.G.Pinto, Portuguese rule - 2020-09-16 (2-JUL-2020+) -->
<pattern>
<token>tem</token>
<token postag='VMP00SM' postag_regexp='no'/>
</pattern>
<message>Substitua por <suggestion><match no='2' regexp_match='VMP00SM' regexp_replace='VMIP3S0'/></suggestion>.</message>
<example correction='pesquisa'>O professor <marker>tem pesquisado</marker> o assunto há décadas.</example>
<example type='correct'>O professor <marker>pesquisa</marker> o assunto há décadas.</example>
<example type='incorrect'>O professor <marker>tem pesquisado</marker> o assunto há décadas.</example>
</rule>
<rule id='TER_PARTICIPIO-PASSADO' name='Ter + Particípio passado'>
<!-- Created by Marco A.G.Pinto, Portuguese rule - 2020-09-16 (2-JUL-2020+) -->
<pattern>
<token>tem</token>
<token postag='VMP00SM' postag_regexp='no'/>
</pattern>
<message>Substitua por <suggestion><match no='2' postag='VMP00SM' postag_regexp="yes" postag_replace='VMIP3S0'/></suggestion>.</message>
<example correction='pesquisa'>O professor <marker>tem pesquisado</marker> o assunto há décadas.</example>
<example type='correct'>O professor <marker>pesquisa</marker> o assunto há décadas.</example>
<example type='incorrect'>O professor <marker>tem pesquisado</marker> o assunto há décadas.</example>
</rule>
But TESTRULES PT still gives an error:
Skipped 0 rules for variant language to avoid checking rules more than once
2545 rules tested.
Exception in thread “main” org.languagetool.rules.patterns.PatternRuleTest$PatternRuleTestFailure: Test failure for rule TER_PARTICIPIO-PASSADO[1] in file /org/languagetool/rules/pt/grammar.xml: Incorrect suggestions: Expected ‘’, got: ‘pesquisa’ on input: ‘O professor tem pesquisado o assunto há décadas.’
at org.languagetool.rules.patterns.PatternRuleTest.assertSuggestions(PatternRuleTest.java:525)
at org.languagetool.rules.patterns.PatternRuleTest.testBadSentences(PatternRuleTest.java:417)
at org.languagetool.rules.patterns.PatternRuleTest.testGrammarRulesFromXML(PatternRuleTest.java:318)
at org.languagetool.rules.patterns.PatternRuleTest.runTestForLanguage(PatternRuleTest.java:169)
at org.languagetool.rules.patterns.PatternRuleTest.runGrammarRulesFromXmlTestIgnoringLanguages(PatternRuleTest.java:152)
at org.languagetool.rules.patterns.PatternRuleTest.main(PatternRuleTest.java:683)