#!/bin/bash
# Test execute_sql "limited" flag behavior
# Usage: ./test_sql_limit.sh [db_path]
# Default: ../db/test.duckdb (ALWAYS USE TEST DATABASE!)
#
# This tests the fix for the bug where "limited" was always false
# even when results were truncated.
# Get absolute paths before changing directory
SCRIPT_DIR=""
PROJECT_DIR=""
# Convert DB_PATH to absolute path (before we cd later)
DB_PATH_ARG=""
if ; then
DB_PATH=""
else
DB_PATH="/"
fi
if [; then
fi
# Navigate to the project directory where skraak binary is located
||
# Helper to run CLI command and capture JSON output (stderr discarded)
# Count total files in database for test planning
FILE_COUNT=
LOCATION_COUNT=
DATASET_COUNT=
# We need at least some files to test truncation
if [; then
fi
TESTS_RUN=0
TESTS_PASSED=0
TESTS_FAILED=0
# Test helper: check limited flag and row count
# Test helper: check query_executed field
if [; then
result=
else
fi
result=
EXPECTED_ROWS=
result=
result=
if [; then
result=
else
fi
result=
EXPECTED_ROWS=
result=
result=
if [; then
else
fi
if [; then
else
fi