Skip to content

Commit

Permalink
test: Update test files from Oracle 19c to Oracle 23ai
Browse files Browse the repository at this point in the history
  • Loading branch information
felipebz committed Jun 15, 2024
1 parent 0ac0549 commit b1c7a4b
Show file tree
Hide file tree
Showing 2,336 changed files with 13,305 additions and 353 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ fun main() {
class OracleDocsExtractor {

fun extract() {
val zipFile = ZipFile(System.getProperty("oracleDocs")) // example: https://docs.oracle.com/en/database/oracle/oracle-database/19/zip/oracle-database_19.zip
val outputDir = File("src/integrationTest/resources/sources/oracle-database_19")
// you need to get the file from https://docs.oracle.com/en/database/oracle/oracle-database/23/zip/oracle-database_23.zip
val zipFile = ZipFile(System.getProperty("oracleDocs"))
val outputDir = File("src/integrationTest/resources/sources/oracle-database_23")

if (outputDir.exists()) {
outputDir.deleteRecursively()
Expand All @@ -58,7 +59,7 @@ class OracleDocsExtractor {
if (text.isNotEmpty()) {
val name = "${File(entry.name).nameWithoutExtension}-$index.sql"
val path = entry.name.substring(entry.name.indexOf("sqlrf"))
text = "-- https://docs.oracle.com/en/database/oracle/oracle-database/19/$path\n$text"
text = "-- https://docs.oracle.com/en/database/oracle/oracle-database/23/$path\n$text"
File(outputDir.absolutePath, name).writeText(text, Charsets.UTF_8)
}
} catch (e: Exception) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ class PlSqlRulingTest {
}

@Test
fun oracleDatabase19() {
val project = "oracle-database_19"
fun oracleDatabase23() {
val project = "oracle-database_23"
if (!File("src/integrationTest/resources/sources/$project").exists()) {
OracleDocsExtractor().extract()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"CAST-6.sql" : [
"CAST-7.sql" : [
12
],
"CREATE-TABLE-31.sql" : [
"CREATE-TABLE-41.sql" : [
6
],
"CREATE-TABLE-46.sql" : [
"CREATE-TABLE-56.sql" : [
6
],
"Concatenation-Operator-1.sql" : [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@
23,
23
],
"SELECT-13.sql" : [
"SELECT-19.sql" : [
4
],
"SELECT-35.sql" : [
"SELECT-43.sql" : [
2,
2
],
"SELECT-43.sql" : [
"SELECT-51.sql" : [
3,
4,
5
],
"SELECT-56.sql" : [
"SELECT-64.sql" : [
2,
2,
2
],
"SELECT-58.sql" : [
"SELECT-66.sql" : [
2,
2,
2
],
"SELECT-87.sql" : [
"SELECT-95.sql" : [
2,
2
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"Literals-9.sql" : [
5
],
"SELECT-85.sql" : [
"SELECT-93.sql" : [
5
],
"Using-Extensible-Indexing-1.sql" : [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"ALTER-SESSION-13.sql" : [
5
],
"ALTER-TABLE-102.sql" : [
"ALTER-TABLE-114.sql" : [
2,
5
],
"ALTER-TABLE-19.sql" : [
"ALTER-TABLE-31.sql" : [
4,
5,
6,
7,
8
],
"ALTER-TABLE-79.sql" : [
"ALTER-TABLE-91.sql" : [
5,
6,
7
Expand All @@ -24,7 +24,7 @@
"COMMIT-0.sql" : [
2
],
"CREATE-TABLE-40.sql" : [
"CREATE-TABLE-50.sql" : [
2
],
"CURRENT_TIMESTAMP-2.sql" : [
Expand All @@ -40,6 +40,22 @@
2,
5
],
"Data-Types-18.sql" : [
2
],
"Data-Types-19.sql" : [
2
],
"Data-Types-21.sql" : [
2,
3,
4,
5,
6,
7,
8,
9
],
"Data-Types-3.sql" : [
4,
5,
Expand Down Expand Up @@ -122,19 +138,7 @@
"Pattern-matching-Conditions-10.sql" : [
3
],
"SELECT-52.sql" : [
2
],
"SELECT-69.sql" : [
6,
7,
8,
9
],
"SELECT-78.sql" : [
2
],
"SELECT-93.sql" : [
"SELECT-102.sql" : [
4,
5,
6,
Expand All @@ -156,7 +160,19 @@
22,
23
],
"SQL-JSON-Conditions-1.sql" : [
"SELECT-60.sql" : [
2
],
"SELECT-77.sql" : [
6,
7,
8,
9
],
"SELECT-86.sql" : [
2
],
"SQL-JSON-Conditions-15.sql" : [
2,
3,
4,
Expand All @@ -165,24 +181,24 @@
7,
8
],
"SQL-JSON-Conditions-15.sql" : [
"SQL-JSON-Conditions-20.sql" : [
2,
3,
4
],
"SQL-JSON-Conditions-29.sql" : [
2,
3,
4,
5,
6,
7
],
"SQL-JSON-Conditions-22.sql" : [
"SQL-JSON-Conditions-37.sql" : [
2,
5,
8
],
"SQL-JSON-Conditions-6.sql" : [
2,
3,
4
],
"Sequence-Pseudocolumns-4.sql" : [
2
],
Expand All @@ -204,5 +220,17 @@
],
"Using-XML-in-SQL-Statements-1.sql" : [
2
],
"domain_name-2.sql" : [
2
],
"domain_name-6.sql" : [
2
],
"to_vector-1.sql" : [
2
],
"vector-0.sql" : [
2
]
}
Loading

0 comments on commit b1c7a4b

Please sign in to comment.