# Copyright 2026 ddbsh reimplementation contributors.
# SPDX-License-Identifier: Apache-2.0
#
# help.txt — golden-parity family for the HELP command (phase 2i, AI-2i-B;
# consolidated into the single golden tree in phase 2j, AI-2j-5). The original
# ddbsh never golden-tested HELP; these goldens were RECORDED FROM THE ORIGINAL
# ddbsh (`ddbshtest -R`, oracle build) and are reproduced byte-for-byte by the
# reimplementation (D-2i-2: the oracle is the golden source). HELP output is
# fully deterministic and version-independent (the usage strings carry no
# version), so no sort (-s) is used.
#
# One test per HELP command FORM (D-2i-3: each whole-command form is a distinct
# command and is covered separately). The grammar's help_command production has
# 28 forms (general + 27 topics); all 28 are covered here.
#
# ${RD} is the single golden results dir (tests/golden/results), set by
# tests/golden/CMakeLists.txt.

add_test(NAME ihelp-general COMMAND ddbshtest -q -T ${RD}/ihelp-general.exp -c "help")
add_test(NAME ihelp-explain COMMAND ddbshtest -q -T ${RD}/ihelp-explain.exp -c "help explain")
add_test(NAME ihelp-begin COMMAND ddbshtest -q -T ${RD}/ihelp-begin.exp -c "help begin")
add_test(NAME ihelp-commit COMMAND ddbshtest -q -T ${RD}/ihelp-commit.exp -c "help commit")
add_test(NAME ihelp-rollback COMMAND ddbshtest -q -T ${RD}/ihelp-rollback.exp -c "help rollback")
add_test(NAME ihelp-connect COMMAND ddbshtest -q -T ${RD}/ihelp-connect.exp -c "help connect")
add_test(NAME ihelp-drop COMMAND ddbshtest -q -T ${RD}/ihelp-drop.exp -c "help drop")
add_test(NAME ihelp-drop-table COMMAND ddbshtest -q -T ${RD}/ihelp-drop-table.exp -c "help drop table")
add_test(NAME ihelp-drop-backup COMMAND ddbshtest -q -T ${RD}/ihelp-drop-backup.exp -c "help drop backup")
add_test(NAME ihelp-describe COMMAND ddbshtest -q -T ${RD}/ihelp-describe.exp -c "help describe")
add_test(NAME ihelp-describe-backup COMMAND ddbshtest -q -T ${RD}/ihelp-describe-backup.exp -c "help describe backup")
add_test(NAME ihelp-show COMMAND ddbshtest -q -T ${RD}/ihelp-show.exp -c "help show")
add_test(NAME ihelp-show-tables COMMAND ddbshtest -q -T ${RD}/ihelp-show-tables.exp -c "help show tables")
add_test(NAME ihelp-show-limits COMMAND ddbshtest -q -T ${RD}/ihelp-show-limits.exp -c "help show limits")
add_test(NAME ihelp-show-backups COMMAND ddbshtest -q -T ${RD}/ihelp-show-backups.exp -c "help show backups")
add_test(NAME ihelp-show-version COMMAND ddbshtest -q -T ${RD}/ihelp-show-version.exp -c "help show version")
add_test(NAME ihelp-show-create-table COMMAND ddbshtest -q -T ${RD}/ihelp-show-create-table.exp -c "help show create table")
add_test(NAME ihelp-create COMMAND ddbshtest -q -T ${RD}/ihelp-create.exp -c "help create")
# ihelp-create-table / ihelp-alter-table / ihelp-select DIVERGE from the retired
# oracle's HELP text. create-table/alter-table document the phase-4a composite
# (multi-part) GSI key syntax (P4a-02 item 1, human-ratified 2026-10-25), the
# phase-4b-doc table_key_schema/index_key_schema split (D-P4a-doc-1 AI-1/AI-2),
# and the phase-4b vector-index (VSI) CREATE/ALTER syntax; select documents the
# phase-4b `NEAREST <n> TO [ ... ]` vector-search clause. All three postdate the
# original ddbsh, which predates composite keys and vector search. The .exp
# files were re-recorded from the reimplementation's updated HELP output; every
# other HELP form remains byte-for-byte oracle parity.
add_test(NAME ihelp-create-table COMMAND ddbshtest -q -T ${RD}/ihelp-create-table.exp -c "help create table")
add_test(NAME ihelp-alter-table COMMAND ddbshtest -q -T ${RD}/ihelp-alter-table.exp -c "help alter table")
add_test(NAME ihelp-backup COMMAND ddbshtest -q -T ${RD}/ihelp-backup.exp -c "help backup")
add_test(NAME ihelp-restore COMMAND ddbshtest -q -T ${RD}/ihelp-restore.exp -c "help restore")
add_test(NAME ihelp-select COMMAND ddbshtest -q -T ${RD}/ihelp-select.exp -c "help select")
add_test(NAME ihelp-insert COMMAND ddbshtest -q -T ${RD}/ihelp-insert.exp -c "help insert")
add_test(NAME ihelp-replace COMMAND ddbshtest -q -T ${RD}/ihelp-replace.exp -c "help replace")
add_test(NAME ihelp-update COMMAND ddbshtest -q -T ${RD}/ihelp-update.exp -c "help update")
add_test(NAME ihelp-upsert COMMAND ddbshtest -q -T ${RD}/ihelp-upsert.exp -c "help upsert")
add_test(NAME ihelp-delete COMMAND ddbshtest -q -T ${RD}/ihelp-delete.exp -c "help delete")
