BBS:      TELESC.NET.BR
Assunto:  src/doors/clans-src/devkit/qtest-scripting.txt src/doors/clans-src/tes
De:       Deuc¨
Data:     Sun, 8 Mar 2026 15:06:12 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/2e772af1e8367036c9f57a47
Added Files:
	src/doors/clans-src/devkit/qtest-scripting.txt src/doors/clans-src/tests/fixtures/qtest/choice.evt fight.evt npc.npc.txt npc_chat.evt src/doors/clans-src/tests/fixtures/qtest/scripts/choice_a.script choice_b.script end.script extra_line.script fight_win.script npc_greet.script type_mismatch.script src/doors/clans-src/tests/fixtures/qtest/simple.evt src/doors/clans-src/tests/test_qtest.sh
Modified Files:
	src/doors/clans-src/devkit/clandev.txt src/doors/clans-src/src/console.c console.h input.c input.h qtest.c video.c video.h src/doors/clans-src/tests/GNUmakefile
Log Message:
Add qtest script mode with integration tests and docs

Implement -s (script file) mode in qtest so that prompt responses can
be driven from a plain text file instead of the keyboard.  Each prompt
type (Choice=, Fight=, Random=, String=, Number=, Topic=) is consumed
in order; exit codes 2 and 3 signal type mismatches and unconsumed
script lines respectively.  On success, a Key=Value state summary is
written to stderr for easy shell assertions.

Add hooks in console.c, input.c, and video.c to intercept GetAnswer,
GetStringChoice, DosGetStr, DosGetLong, and Fight_Fight for script
mode.  Add state-preset arguments (-G, -H, -P, -D, -T, -g, -m, -q,
-Q) that work in both interactive and script mode.

Add 29 integration tests in tests/test_qtest.sh covering argument
validation, simple events, choice branches, fight outcomes, NPC chat,
state arguments, type mismatch detection, and unconsumed script
detection.  Fixtures live in tests/fixtures/qtest/.

Add devkit/qtest-scripting.txt as the full scripting reference and
update devkit/clandev.txt section 4.3 to describe script mode and
point to it.

Co-Authored-By: Claude Sonnet 4.6 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]