Test suite for lib-core.crafting-display v0.1.0. Covers:
1. create returns widget_def with render, handle_input, title set
from opts.
2. register_action + unregister_action round-trip: action-count
goes 0 -> 1 -> 0.
3. Duplicate action label -> Loud-Error matching
'crafting-display.register_action.*duplicate'.
4. Non-function callback -> Loud-Error matching
'crafting-display.register_action.*callback'.
5. Default action-set is empty directly after create.
6. Rows filtered via is_known: only known recipes appear in the
per-frame row-list (one recipe is_known=false is hidden).
7. Per-row availability flag matches can_craft.ok: container with
1x rock makes a recipe needing rock available=true and a
recipe needing missing stick available=false.
8. Resolver overrides (set_icon_resolver / set_label_resolver /
set_summary_resolver) actually take effect — backdoors return
the overridden values.
Uses engine.test.assert with string.find for pattern matching
loud-error messages (engine.test has no assert_match helper).
Per-test isolation via crafting._test_clear_all; composition
templates are defined once at module-scope under namespace
craft_display_test.* (composition has no clear-all hook).
Depends on lib-core.crafting-display 0.1.0, lib-core.crafting
0.1.0, lib-core.panel 0.1.1, lib-core.inventory-list 0.1.0,
lib-core.composition 0.3.0 — all five declared directly per
engine's per-module non-transitive resolver.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
25 lines
1.2 KiB
Plaintext
25 lines
1.2 KiB
Plaintext
Copyright (c) 2026 Calic. All rights reserved.
|
|
|
|
This software is part of the Sporel platform — **Tier 1 (Official /
|
|
Proprietary)** content per the Three-Tier Licensing Model documented in
|
|
`meta/docs/archive/design/vision.md §Licensing Model` (current source;
|
|
migration to `meta/docs/architecture/licensing-model.md` pending).
|
|
|
|
⚠ **WIP — Legal review required before public launch.** The terms below
|
|
reflect design intent only; the formalized license framework will be
|
|
finalized through legal counsel before the first public release. Until
|
|
then, this notice serves as a placeholder defending the platform owner's
|
|
rights against unintentional re-licensing.
|
|
|
|
No license is granted to copy, modify, distribute, sublicense, or otherwise
|
|
use this software in any form without prior written permission from the
|
|
copyright holder.
|
|
|
|
References:
|
|
- Tier 1 (this file): all rights reserved, proprietary, sold/distributed
|
|
via official channels (Steam, etc.)
|
|
- Tier 2 (Semi-Commercial Co-Development): bilateral contracts, revenue-
|
|
share — see vision.md §Licensing Model
|
|
- Tier 3 (Community Content): CC BY-NC-SA 4.0 + asymmetric CLA — applies
|
|
to community-uploaded libs/modules/assets, not this repo
|