Files
gen1recomp/tools/save-editor
johnjohto ff90062741 Make the T3 content tier run on Windows (#269)
* Make ROM-free test tiers actually run on Windows

Suite discovery, the extension-point catalog scan, mod test-dir pickup,
and the meta-coverage corpus all shelled out to ls/find/test -d, which do
not exist in cmd.exe. Every listing came back empty on Windows, so tiers
ran 0 suites and still reported ALL TESTS PASSED.

Add portable probes to tests/fs_io.lua (same Unix commands on
Linux/macOS; dir /b and a shell-free rename-self existence check on
Windows) and rewire the four call sites to them. 15/15 engine suites and
2/2 modkit suites now genuinely run and pass on Windows.

Fixes #266

* Make the T3 content tier run on Windows

The content tier had the same Unix-shell assumptions as the tier
discovery fixed in #267, one level down:

- run_tests.lua redirected to /dev/null when chaining tier runners
- mod_runtime_tests.lua called ffi setenv/unsetenv, which msvcrt lacks
  (_putenv with an empty value unsets)
- modkit_tests.lua captured exit codes with POSIX '; echo 0' (cmd
  needs /v:on and !errorlevel!), called python3 (python on Windows),
  and used mkdir -p / rm -rf; cmd mkdir makes parents on its own and
  read -p as a directory name
- the save-editor suites globbed save backups with ls
- tools/save-editor/Catalog.lua scraped mod flags with ls; this one
  affects the real editor on Windows, not just tests

With a ROM imported, run_tests.lua goes from 12 failures to the 3 that
track the missing audio.lua generation (#268), which fails on any OS
and needs a maintainer decision.

---------

Co-authored-by: johnjohto <johnjohto@users.noreply.github.com>
2026-07-27 10:04:35 -04:00
..
2026-07-17 20:30:02 -04:00
2026-07-19 16:18:18 -04:00
2026-07-17 20:30:02 -04:00
2026-07-17 20:30:02 -04:00
2026-07-17 20:30:02 -04:00
2026-07-19 16:18:18 -04:00
2026-07-17 20:30:02 -04:00

Save Editor

# from repo root, game closed
love . --editor
# or
POKEPORT_EDITOR=1 love .
# open a specific save (any path)
love . --editor --save "/path/to/save.lua"

By default loads the game's LÖVE save:

  • macOS: ~/Library/Application Support/LOVE/pokemon-love2d/save.lua
  • Linux: ~/.local/share/love/pokemon-love2d/save.lua
  • Windows: %APPDATA%\love\pokemon-love2d\save.lua

If the file isn't there (or you want another copy), use Open..., drop a save.lua onto the window, or pass --save. Each write makes save.lua.bak-YYYYMMDD-HHMMSS first.

Headless tests

Run from repo root (use lua5.4 or the same Lua 5.4 binary as tests/run_tests.lua):

lua5.4 tests/run_save_editor_tests.lua      # core logic + Party/MonEditor (60 tests)
lua5.4 tests/save_editor_task6_tests.lua    # Boxes + Items panels
lua5.4 tests/save_editor_task7_tests.lua      # Events + Dex panels
lua5.4 tests/save_editor_task8_tests.lua      # Map browser + set location

The task-specific suites are separate files (each defines its own harness) so they can be run independently without colliding with the main runner.