mirror of
https://github.com/Mudlet/Mudlet
synced 2026-08-13 18:26:27 -04:00
#### Brief overview of PR changes/additions - 134 new busted specs in `UI_spec.lua` for 24 UI functions that had no coverage anywhere: label movies, console buffer sizing, main window size, saved window layout, the application/profile style sheets, toolbar buttons, command line actions, `setPopup` and `createLabel` into a user window. - Effects are read back for real, not just return values: movies through `getProfileStats().gifs`, buffer limits through observed line trimming, `setAppStyleSheet` through the `sysAppStyleSheetChange` it raises, toolbars through `isActive()`, and the user window label by hiding its parent. No binary fixture is committed - the movie specs assemble a three-frame GIF89a at run time. - The button specs install a tiny action package for the block, because Lua cannot make a push-down button and cannot remove a `tempButton` again; everything created is taken away in teardown, including the two layout files that live outside the profile. #### Motivation for adding to Mudlet Last of the busted-reachable UI rows in the Lua API test-coverage program. Nine functions turned out to have no reachable readback at all and are marked `pending()` with the reason rather than given a spec that cannot fail. #### Other info (issues closed, discussion etc) Bugs found while writing these, all left unspecced and marked `pending()` instead: - `Host::setMovie` hands the `QMovie` to the gif tracker before reading the file, so a refused `setMovie` still counts one in `getProfileStats()`, and over a working movie it leaves the label driving a dead one. - `createLabel` puts the label in the main window and answers `true` when the parent window name is not a window. - `showToolBar`/`hideToolBar` only answer to a package's name, never a packaged toolbar's own name, and move every toolbar in the package at once; an unmatched name is a silent no-op. - `setPopup` takes a `luaL_ref` per function command before its size check and window lookup, so both error paths strand registry references. - `clearCmdLineSuggestions` gates on `n == 1` where `addCmdLineSuggestion` gates on `n > 1`, so a second argument silently retargets the main command line. - `setConsoleBufferSize` never floors the batch deletion size, so `0` stops the buffer shrinking at all. Pre-existing and untouched here: on a reused profile the suite's second run fails `getMainWindowSize returns a positive width and height` - it reproduces identically on development. **Test case:** full busted suite green on a fresh profile (2534 successes, 141 pending, +2.7s in `UI_spec`), and twice on one reused profile with the same single pre-existing failure development has; 35 of the 134 new specs (26%) verified to fail when the underlying C++ is locally broken, and the new `MUDLET_TEST_REQUIRE_WINDOW_RESIZE` gate proven to fail rather than skip when a resize stops working. Assisted-by: Claude:claude-opus-5 |
||
|---|---|---|
| .. | ||
| codeql | ||
| ISSUE_TEMPLATE | ||
| scripts | ||
| skills/open-pr | ||
| workflows | ||
| CODEOWNERS | ||
| codespell-wordlist.txt | ||
| copilot-instructions.md | ||
| dependabot.yml | ||
| pr-labeler.yml | ||
| PULL_REQUEST_TEMPLATE.md | ||
| repo-metadata.yml | ||