lib-core.inventory-list-display-test

Test module for lib-core.inventory-list-display. Runs 9 assertions headless via engine.test.* (TAP output).

Version: 0.1.0 Lib-ID: lib-core.inventory-list-display-test Role: test Requires: lib-core.inventory-list-display v0.1.0, lib-core.inventory-list v0.1.0, lib-core.composition v0.2.0

Running

export PATH="/c/msys64/mingw64/bin:$PATH"
cd ~/Projects/Sporel/sporel-engine
SPOREL_LIBS_DIR=~/Projects/Sporel/sporel-libs SPOREL_CI=1 SPOREL_LOG_STDERR=1 \
    ./build/Sporel.exe --test-libs=lib-core.inventory-list-display-test 2>&1 | tail -15

Expected: pass=N fail=0 where N >= 9.

Assertions

  1. create returns widget_def with render, handle_input, and correct title
  2. create with a non-container entity loud-errors
  3. register_action + unregister_action round-trip completes without error
  4. Duplicate action label loud-errors
  5. Non-function callback loud-errors
  6. Default action-set is empty; unregister_action on unknown label is a no-op
  7. _test_get_rows returns items in inventory.contents order
  8. Default icon-resolver reads sprite_atlas and sprite_uv.* from item properties
  9. Custom icon-resolver is invoked after set_icon_resolver
Description
No description provided
Readme 34 KiB
Languages
Lua 100%