[plsql] Add test for #195 - SqlPlus lexical variables
This commit is contained in:
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.plsql.ast;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import net.sourceforge.pmd.lang.ast.test.BaseParsingHelper;
|
||||
import net.sourceforge.pmd.lang.ast.test.BaseTreeDumpTest;
|
||||
import net.sourceforge.pmd.lang.ast.test.RelevantAttributePrinter;
|
||||
import net.sourceforge.pmd.lang.plsql.PlsqlParsingHelper;
|
||||
|
||||
public class PlsqlTreeDumpTest extends BaseTreeDumpTest {
|
||||
|
||||
public PlsqlTreeDumpTest() {
|
||||
super(new RelevantAttributePrinter(), ".pls");
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseParsingHelper<?, ?> getParser() {
|
||||
return PlsqlParsingHelper.WITH_PROCESSING.withResourceContext(getClass());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sqlPlusLexicalVariables() {
|
||||
doTest("SqlPlusLexicalVariablesIssue195");
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
|
||||
-- see https://github.com/pmd/pmd/issues/195
|
||||
-- both define and spool are SQL*Plus commands, and they should not be ended with a semi-colon.
|
||||
|
||||
define patch_name = acme_module
|
||||
spool &patch_name..log
|
@ -0,0 +1,9 @@
|
||||
+- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0, @Sourcecode = "
|
||||
-- see https://github.com/pmd/pmd/issues/195
|
||||
-- both define and spool are SQL*Plus commands, and they should not be ended with a semi-colon.
|
||||
|
||||
define patch_name = acme_module
|
||||
spool &patch_name..log
|
||||
"]
|
||||
+- SqlPlusCommand[@CanonicalImage = "DEFINE PATCH_NAME = ACME_MODULE", @Image = "define patch_name = acme_module "]
|
||||
+- SqlPlusCommand[@CanonicalImage = "SPOOL &PATCH_NAME. . LOG", @Image = "spool &patch_name. . log "]
|
Reference in New Issue
Block a user