#!/bin/sh
set -e

exec 3>&2
run() { echo "+ $*" >&3; "$@"; }

# Check that the TPC-H benchmark extension loads and generates data.
# The TPC-H specification defines exactly 25 nations.
result=$(run duckdb -c "LOAD tpch; CALL dbgen(sf=0.01); SELECT count(*) FROM nation;")
echo "$result" | grep -q "25"
