From d797c861e72cca01fd9dd225aa6288d6b2914675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Sat, 30 Apr 2022 16:09:31 +0200 Subject: [PATCH] Fix last psql refs --- .../plsql/ast/AllPlsqlAstTreeDumpTest.java | 19 +++++++++++++++++++ .../ast/ExecuteImmediateBulkCollect1.txt | 2 +- .../ast/ExecuteImmediateBulkCollect2.txt | 2 +- .../ast/ExecuteImmediateBulkCollect3.txt | 2 +- .../pmd/lang/plsql/ast/ParenthesisGroup0.txt | 2 +- .../pmd/lang/plsql/ast/ParenthesisGroup1.txt | 2 +- .../pmd/lang/plsql/ast/ParenthesisGroup2.txt | 2 +- 7 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 pmd-plsql/src/test/java/net/sourceforge/pmd/lang/plsql/ast/AllPlsqlAstTreeDumpTest.java diff --git a/pmd-plsql/src/test/java/net/sourceforge/pmd/lang/plsql/ast/AllPlsqlAstTreeDumpTest.java b/pmd-plsql/src/test/java/net/sourceforge/pmd/lang/plsql/ast/AllPlsqlAstTreeDumpTest.java new file mode 100644 index 0000000000..4b09b78897 --- /dev/null +++ b/pmd-plsql/src/test/java/net/sourceforge/pmd/lang/plsql/ast/AllPlsqlAstTreeDumpTest.java @@ -0,0 +1,19 @@ +/** + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.lang.plsql.ast; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + PlsqlTreeDumpTest.class, + ParenthesisGroupTest.class, + ExecuteImmediateBulkCollectTest.class +}) +public class AllPlsqlAstTreeDumpTest { + +} diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect1.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect1.txt index 66c85d1839..1a37b67ae3 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect1.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect1.txt @@ -1,4 +1,4 @@ -+- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0, @Sourcecode = "--\n-- BSD-style license; for more info see http://pmd.sourceforge.net/license.html\n--\n\nCREATE OR REPLACE PROCEDURE EXAMPLE_PROCEDURE IS\n --\n TYPE t_data IS TABLE OF dual%ROWTYPE INDEX BY BINARY_INTEGER;\n --\n l_data t_data;\n l_sql VARCHAR2(500);\n --\nBEGIN\n --\n l_sql := \'SELECT * FROM DUAL\';\n --\n EXECUTE IMMEDIATE l_sql BULK COLLECT\n INTO l_data;\n --\nEND EXAMPLE_PROCEDURE;\n"] ++- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- Global[@CanonicalImage = null] +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect2.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect2.txt index 8965dd564c..6864c8b811 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect2.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect2.txt @@ -1,4 +1,4 @@ -+- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0, @Sourcecode = "--\n-- BSD-style license; for more info see http://pmd.sourceforge.net/license.html\n--\n\nCREATE OR REPLACE PROCEDURE EXAMPLE_PROCEDURE IS\n --\n TYPE t_data_key IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;\n TYPE t_data_description IS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER;\n --\n l_data_key t_data_key;\n l_data_description t_data_description;\n l_sql VARCHAR2(500);\n p_rownum1 NUMBER(20);\n p_rownum2 NUMBER(20);\n --\nBEGIN\n --\n p_rownum1 := 10;\n p_rownum2 := 30;\n --\n l_sql := \'SELECT 1, \' || CHR(39) || \'First key\' || CHR(39) || \n \' FROM DUAL \'||\' WHERE ROWNUM <= :p_rownum1 \' ||\n \'UNION ALL \'||\n \'SELECT 2, \' || CHR(39) || \'Second key \' || CHR(39) || \n \' FROM DUAL\'||\' WHERE ROWNUM <= :p_rownum2 \';\n --\n EXECUTE IMMEDIATE l_sql BULK COLLECT\n INTO l_data_key, l_data_description USING p_rownum1, p_rownum2;\n --\nEND EXAMPLE_PROCEDURE;\n"] ++- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- Global[@CanonicalImage = null] +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect3.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect3.txt index 14ea63e5da..2d8a3b127a 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect3.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect3.txt @@ -1,4 +1,4 @@ -+- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0, @Sourcecode = "--\n-- BSD-style license; for more info see http://pmd.sourceforge.net/license.html\n--\n\nCREATE OR REPLACE PROCEDURE EXAMPLE_PROCEDURE IS\n --\n TYPE t_data_key IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;\n TYPE t_data_description IS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER;\n --\n l_data_key t_data_key;\n l_data_description t_data_description;\n l_sql VARCHAR2(500);\n --\nBEGIN\n --\n l_sql := \'SELECT 1, \' || CHR(39) || \'First key\' || CHR(39) || \n \' FROM DUAL \'||\n \'UNION ALL \'||\n \'SELECT 2, \' || CHR(39) || \'Second key \' || CHR(39) || \n \' FROM DUAL\';\n --\n EXECUTE IMMEDIATE l_sql BULK COLLECT\n INTO l_data_key, l_data_description;\n --\nEND EXAMPLE_PROCEDURE;\n"] ++- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- Global[@CanonicalImage = null] +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup0.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup0.txt index 70ad135b19..c45893721b 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup0.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup0.txt @@ -1,4 +1,4 @@ -+- Input[@CanonicalImage = null, @ExcludedLinesCount = "0", @ExcludedRangesCount = "0"] ++- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- Global[@CanonicalImage = null] +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup1.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup1.txt index 3509d8568b..71d9aa3509 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup1.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup1.txt @@ -1,4 +1,4 @@ -+- Input[@CanonicalImage = null, @ExcludedLinesCount = "0", @ExcludedRangesCount = "0"] ++- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- Global[@CanonicalImage = null] +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup2.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup2.txt index ec719209ce..7880baff0a 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup2.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup2.txt @@ -1,4 +1,4 @@ -+- Input[@CanonicalImage = null, @ExcludedLinesCount = "0", @ExcludedRangesCount = "0"] ++- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- Global[@CanonicalImage = null] +- ProgramUnit[@CanonicalImage = null, @MethodName = "TEST_PROCEDURE", @Name = "TEST_PROCEDURE", @ObjectName = null] +- MethodDeclarator[@CanonicalImage = "TEST_PROCEDURE", @Image = "TEST_PROCEDURE", @ParameterCount = 1]