forked from phoedos/pmd
Add test for PLSQL ignore literals
This commit is contained in:
@ -6,8 +6,10 @@ package net.sourceforge.pmd.lang.plsql.cpd;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import net.sourceforge.pmd.cpd.CpdLanguageProperties;
|
||||
import net.sourceforge.pmd.lang.plsql.PLSQLLanguageModule;
|
||||
import net.sourceforge.pmd.lang.test.cpd.CpdTextComparisonTest;
|
||||
import net.sourceforge.pmd.lang.test.cpd.LanguagePropertyConfig;
|
||||
|
||||
class PLSQLCpdLexerTest extends CpdTextComparisonTest {
|
||||
|
||||
@ -29,4 +31,15 @@ class PLSQLCpdLexerTest extends CpdTextComparisonTest {
|
||||
void testTabWidth() {
|
||||
doTest("tabWidth");
|
||||
}
|
||||
|
||||
@Test
|
||||
void anonymizeLiterals() {
|
||||
doTest("sample-plsql", "_ignore-literals", ignoreLiterals());
|
||||
}
|
||||
|
||||
LanguagePropertyConfig ignoreLiterals() {
|
||||
return props -> {
|
||||
props.setProperty(CpdLanguageProperties.CPD_ANONYMIZE_LITERALS, true);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user