Files
RedBear-OS/local
vasilito 4243beb4ae test-edit-kf6-recipes: 11 unit tests for the edit script heredoc
Tests the python heredoc that is the meat of
`edit-kf6-recipes-for-patches.sh` — the script that
replaces every `sed -i ...` chain in a recipe's
[build].script with a single cookbook_apply_patches
call.

Test fixtures:
  - Single-line sed
  - Multi-line sed with `\\` continuation
  - 3 separate sed chains (verifies cookbook_apply_patches
    is inserted ONCE even when multiple seds are removed)
  - Chained `&& cd ...` sed
  - No-sed baseline (text unchanged)
  - 4-level path verification
  - Real kf6-karchive recipe (4 sed chains, all removed)

TestScriptStructure checks:
  - Script exists and is executable
  - Script targets all 29 recipes with migration patches
  - Script uses 4-level path (../ x4) for KF6 recipes
  - Script skips already-migrated recipes (idempotency)

Makefile:
  - New `test-edit-kf6-recipes` target
  - Added to `lint-build-system-all` aggregate

Total: 11 new tests, 160 Python tests total (149 +
11).
2026-06-12 21:51:19 +03:00
..