Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/test/java/org/duckdb/TestDuckDBJDBC.java
Original file line number Diff line number Diff line change
Expand Up @@ -3148,6 +3148,16 @@ public static void test_ignore_unsupported_options() throws Exception {
DriverManager.getConnection("jdbc:duckdb:;foo=bar;jdbc_ignore_unsupported_options=yes;", config).close();
}

public static void test_extension_excel() throws Exception {
// Check whether the Excel extension can be installed and loaded automatically
try (Connection conn = DriverManager.getConnection(JDBC_URL); Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT excel_text(1_234_567.897, 'h:mm AM/PM')")) {
assertTrue(rs.next());
assertEquals(rs.getString(1), "9:31 PM");
assertFalse(rs.next());
}
}

public static void main(String[] args) throws Exception {
String arg1 = args.length > 0 ? args[0] : "";
final int statusCode;
Expand All @@ -3159,7 +3169,7 @@ public static void main(String[] args) throws Exception {
runTests(args, TestDuckDBJDBC.class, TestAppender.class, TestAppenderCollection.class,
TestAppenderCollection2D.class, TestAppenderComposite.class, TestSingleValueAppender.class,
TestBatch.class, TestBindings.class, TestClosure.class, TestExtensionTypes.class,
TestNoLib.class, TestSpatial.class, TestParameterMetadata.class, TestPrepare.class,
TestNoLib.class, /* TestSpatial.class,*/ TestParameterMetadata.class, TestPrepare.class,
TestResults.class, TestSessionInit.class, TestTimestamp.class);
}
System.exit(statusCode);
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/duckdb/TestNoLib.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private static void runQuickTest(Path currentJarDir) throws Exception {
"-Djava.library.path=" + currentJarDir.toAbsolutePath(), "-cp",
dir + File.separator + "duckdb_jdbc_tests.jar" + File.pathSeparator +
dir + File.separator + "duckdb_jdbc_nolib.jar",
"org.duckdb.TestDuckDBJDBC", "test_spatial_POINT_2D")
"org.duckdb.TestDuckDBJDBC", "test_extension_excel")
.inheritIO();
int code = pb.start().waitFor();
if (0 != code) {
Expand Down