diff --git a/README.md b/README.md index 1f081c5..865f75d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ The infamous [DuckDB quack extension](https://duckdb.org/community_extensions/ex ## Building the Extension -[Install Zig](https://ziglang.org/learn/getting-started/). That's it. No other dependencies are required. +Install [Zig](https://ziglang.org) and [uv](https://docs.astral.sh/uv/). That's it. No other dependencies are required. Now experience the power of the [Zig Build System](https://ziglang.org/learn/build-system/) with these commands: @@ -52,6 +52,16 @@ zig-out See `zig build --help` for more options. +## Testing + +Run the [SQL logic tests](https://duckdb.org/docs/dev/sqllogictest/intro.html) with `zig build test`. + +``` +โฏ zig build test +[0/1] test/sql/quack.test +SUCCESS +``` + ## Using the Extension ``` @@ -59,13 +69,13 @@ See `zig build --help` for more options. v1.1.3 19864453f7 Enter ".help" for usage hints. ๐ŸŸกโ—— LOAD 'zig-out/osx_arm64/quack.duckdb_extension'; -๐ŸŸกโ—— SELECT quack('||| Arena'); -โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” -โ”‚ quack('||| Arena') โ”‚ -โ”‚ varchar โ”‚ -โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค -โ”‚ Quack ||| Arena ๐Ÿฅ โ”‚ -โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +๐ŸŸกโ—— SELECT quack('Zig'); +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ quack('Zig') โ”‚ +โ”‚ varchar โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ Quack Zig ๐Ÿฅ โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` ## Advanced: Creating an Extension Repository diff --git a/build.zig b/build.zig index 394f786..44ef827 100644 --- a/build.zig +++ b/build.zig @@ -123,7 +123,7 @@ pub fn build(b: *std.Build) !void { cmd.addArg("--external-extension"); cmd.addFileArg(ext_path); - const test_step = b.step("test", "Run unit tests with sqllogictest"); + const test_step = b.step("test", "Run SQL logic tests"); test_step.dependOn(&cmd.step); } }