DazedTL/tests/fixtures/README.md
DazedAnon 4d1b01c870 refactor!: rebrand product from DazedMTLTool to DazedTL
- Rename desktop launcher, window titles, About, and User-Agents
- Point QSettings at DazedTL with one-time migration from legacy app key
- Update README, Guide, skills, and launcher/script copy

BREAKING CHANGE: QSettings and desktop id now use DazedTL (legacy keys migrated once)
2026-07-22 12:27:22 -05:00

2.9 KiB
Raw Blame History

Map _original fixture

Files

  • Map_original_fixture.json — Minimal RPG Maker MV map (17×13) with one event exercising every _original code path: 401, 405, 102, 101, and 122.
  • Map_original_fixture_manifest.json — Expected _original values after translation (used by tests).

Event layout (event id 1, page 0)

Order Code Purpose
12 401 Color speaker line \C[2]テスト子\C[0] + following dialogue
34 401 Merged multi-line dialogue (two 401s → one batch)
56 101, 405 Empty face setup + scrolling text line
7 102 Three choices (middle choice has if(...) prefix)
89 108, 408 Choice-help marker (選択肢ヘルプ) + help comment line
1011 101, 401 Name box with \C[2]アリス\C[0] + dialogue
1011 122 Variable string `変数の中身` and `セミコロン`;

Run the test

Using the project venv (recommended):

./tests/run_tests.sh

Or explicitly:

./tests/run_tests.sh tests.test_mvmz_source_original -v
./tests/run_tests.sh tests.test_mvmz_source_original.TestFixtureMapOriginal -v

Manual equivalent (must run from project root, with venv activated):

cd /path/to/DazedTL
source .venv/bin/activate   # or: source venv/bin/activate
python -m unittest tests.test_mvmz_source_original -v

Do not use pytest unless you install it yourself — this project uses the stdlib unittest runner.

If you see ModuleNotFoundError: No module named 'colorama' (or similar), activate the venv or use ./tests/run_tests.sh instead of system python3.

Tests mock translateAI / getSpeaker — no API key required.

Optional _original config (in modules/rpgmakermvmz.py)

Flag Scope Default
PRESERVEORIGINAL Map/event commands and database JSON True

Set to False to skip writing _original. Existing _original keys are still read on re-run.

Database _original fixtures

Mini database JSON files for scalar field preservation (notes deferred to Phase 2):

Fixture Parser Fields
Actors_original_fixture.json searchNames name, nickname, profile
Items_original_fixture.json searchNames name, description
Skills_original_fixture.json searchNames name, description, message1
States_original_fixture.json searchSS name, description, message1
System_original_fixture.json searchSystem gameTitle, terms.basic[1], armorTypes[1], terms.messages.alwaysDash

Expected _original shapes are in db_original_manifest.json.

./tests/run_tests.sh tests.test_mvmz_db_original -v

Manual check

Copy the fixture into files/ and run the tool with batch/consume or live translate, then diff against the manifests expected_original fields in translated/Map_original_fixture.json.