Files
sporel-lib-core.inventory-l…/README.md
Calic 3ae9799d4d initial: inventory-list-test v0.1.0 — 12 assertions
Covers engine spike (multi-slot children), add/remove/contains/count
round-trips, Loud-Error paths (no container block, no stack_mode,
stack_mode=stack), renderable-tag toggle via set_tag, and slot-naming
reconstruction from get_children (simulated post-reload state).
2026-06-13 17:33:18 +02:00

1.0 KiB

lib-core.inventory-list-test

Test suite for lib-core.inventory-list v0.1.0.

12 assertions: 1 engine spike + 11 spec assertions.

# Description
spike engine.entity supports 3 children on distinct slot names
1 addcontains true
2 after add: count == 1, contents contains item
3 two adds → count == 2, both in contents, distinct slot names
4 removecontains false, count == 0
5 add to entity without container block → Loud-Error
6 add entity without stack_mode → Loud-Error
7 add item with stack_mode="stack" → Loud-Error
8 add to non-container-template entity → Loud-Error
9 add removes item from renderable index
10 remove restores item to renderable index
11 slot-naming reconstruction from get_children (simulated reload)

Run:

SPOREL_LIBS_DIR=~/Projects/Sporel/sporel-libs SPOREL_CI=1 SPOREL_LOG_STDERR=1 \
  ./build/Sporel.exe --test-libs=lib-core.inventory-list-test 2>&1 | tail -30