Type at the window with a real keyboard: the akgl_typing test
Some checks failed
akbasic CI Build / cmake_build (push) Failing after 18s
akbasic CI Build / sanitizers (push) Failing after 13s
akbasic CI Build / coverage (push) Failing after 16s
akbasic CI Build / akgl_build (push) Failing after 17s
akbasic CI Build / mutation_test (push) Failing after 17s
Some checks failed
akbasic CI Build / cmake_build (push) Failing after 18s
akbasic CI Build / sanitizers (push) Failing after 13s
akbasic CI Build / coverage (push) Failing after 16s
akbasic CI Build / akgl_build (push) Failing after 17s
akbasic CI Build / mutation_test (push) Failing after 17s
xdotool closes the gap that shipped the missing SDL_StartTextInput(). Every other keyboard test synthesises SDL events, which covers the code downstream of SDL and cannot cover the code upstream of it -- so the suite stayed green while the real keyboard was dead. akgl_typing starts the driver under a pty, waits for the window with xdotool search --sync, gives it focus, and types a program containing a string literal and a lower-case one, polling the mirrored stdout for what they print. Verified by reverting both halves of the text-input fix and watching it fail with the reported symptom: READY, and nothing after it. Skips rather than fails without a display, xdotool, script(1) or a window manager -- none of those means the answer is no. It steals keyboard focus for about fifteen seconds; AKBASIC_SKIP_INTERACTIVE=1 skips it deliberately. xdotool and script(1) are documented as optional test dependencies, alongside what gcovr and python3 already bought. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -265,6 +265,12 @@ ctest --test-dir build --output-on-failure
|
||||
ctest --test-dir build -R <name> --output-on-failure # single test
|
||||
```
|
||||
|
||||
**Optional test tooling for this repository.** `xdotool` and `script`(1) drive the `akgl_typing`
|
||||
test, which types at a real focused SDL window -- the only test that covers the path upstream of
|
||||
SDL, and the one that would have caught the missing `SDL_StartTextInput()`. It needs a real X
|
||||
server, steals keyboard focus for about fifteen seconds, and skips itself (CTest `Skipped`, not
|
||||
a failure) when it cannot run. `AKBASIC_SKIP_INTERACTIVE=1` skips it deliberately.
|
||||
|
||||
Extra harnesses, by library (option prefixes differ per repo):
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user