#!/usr/bin/env bash set -euo pipefail SQLITE3_BIN=${SQLITE3_BIN:-sqlite3} EXTENSION_FILE=${EXTENSION_FILE:-target/debug/examples/libsqlite_compressions} if [ ! -f "$EXTENSION_FILE" ] && [ ! -f "$EXTENSION_FILE.so" ] && [ ! -f "$EXTENSION_FILE.dylib" ] && [ ! -f "$EXTENSION_FILE.dll" ]; then echo "Extension file $EXTENSION_FILE [.so|.dylib|.dll] do not exist. Run 'just build-ext' first. Available files:" ls -l "$EXTENSION_FILE"* exit 1 fi echo "Using extension file '$EXTENSION_FILE [.so|.dylib|.dll]'" if ! command -v "$SQLITE3_BIN" > /dev/null; then echo "$SQLITE3_BIN executable could not be found" exit 1 fi echo "Found $SQLITE3_BIN executable $($SQLITE3_BIN --version)" test_one() { local sql=$1 local expected=$2 echo "Trying to get '$expected' from $sql" result=$($SQLITE3_BIN <