aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_layout.lua
AgeCommit message (Collapse)AuthorFilesLines
2026-09-16test: make the layout assertion actually able to failDanilo M.1-1/+6
The out-of-grid check iterated `G.layout or {}`. With layout unexported that walks an empty table, so the block passed vacuously and the test could never detect the very condition it existed to check. Confirmed by unexporting layout and watching the suite still pass. Drops the fallback and asserts the export first. Verified by mutation: unexporting layout now fails with "dashboard.lua must export layout", and moving the clock to col=5 fails with "layout entry out of columns", so both paths have teeth. The plan's Step 3 expected a failure that could not happen; it now says what the failure looks like and warns that a pass there means the test is broken rather than the code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16test: check grid maths on both real screen sizesDanilo M.1-0/+60
The grid's justification is that one layout table works on differently shaped screens, so assert it: every cell lands inside the margins at 2560x1080 and 1920x1080, a spanning cell absorbs the gap it covers, and no shipped layout entry falls outside the declared grid. dashboard.lua exports its internals for this; cairo and lib.card are stubbed via package.preload since they only exist inside Conky. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>