Initial commit

This commit is contained in:
Y.
2025-02-17 11:01:48 +01:00
committed by Yves
parent 305938d851
commit aec3a15ece
22 changed files with 951 additions and 0 deletions

11
test/README.md Normal file
View File

@@ -0,0 +1,11 @@
# Testing this extension
This directory contains all the tests for this extension. The `sql` directory holds tests that are written as [SQLLogicTests](https://duckdb.org/dev/sqllogictest/intro.html). DuckDB aims to have most its tests in this format as SQL statements, so for the quack extension, this should probably be the goal too.
The root makefile contains targets to build and run all of these tests. To run the SQLLogicTests:
```bash
make test
```
or
```bash
make test_debug
```

23
test/sql/quack.test Normal file
View File

@@ -0,0 +1,23 @@
# name: test/sql/quack.test
# description: test quack extension
# group: [quack]
# Before we load the extension, this will fail
statement error
SELECT quack('Sam');
----
Catalog Error: Scalar Function with name quack does not exist!
# Require statement will ensure this test is run with this extension loaded
require quack
# Confirm the extension works
query I
SELECT quack('Sam');
----
Quack Sam 🐥
query I
SELECT quack_openssl_version('Michael') ILIKE 'Quack Michael, my linked OpenSSL version is OpenSSL%';
----
true