feat: build profile for The Only Doe 0.05 that fixes an assignment in a menu condition
sleep.rpy tests `... before_sleeping=2` (assignment) in an elif; sleep.rpyc holds the same text, so Ren'Py cannot compile that branch either. Builds can now carry exact-line patches pinned by the SHA-256 of the line and the build fingerprint; this one restores `==2`. Anything else stays strict. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4dc9836a8b
commit
0822c76321
2 files changed
+45
No files matched your search
@@ -52,3 +52,22 @@ def test_known_defects_are_waived_only_up_to_the_recorded_count():
|
||||
assert blocking == [new] and known == [known_issue]
|
||||
same_message_other_script = Issue(code, message, "SomewhereElse:1")
|
||||
assert split_known([same_message_other_script])[0] == [same_message_other_script]
|
||||
|
||||
|
||||
def test_known_build_line_patch_requires_the_exact_line():
|
||||
import hashlib
|
||||
|
||||
from app.games import renpy_builds
|
||||
|
||||
wrong = ' elif wake_up_after_sex=="spitroast" and number_of_people_had_sex_with_before_sleeping=2:'
|
||||
fixed = wrong.replace("=2:", "==2:")
|
||||
assert hashlib.sha256(wrong.encode()).hexdigest() in renpy_builds.BUILDS[
|
||||
"bb19a33af00324fa027a629c052aee885e72f1b7bee7074403a5b9e20c69e2d8"]["lines"]["sleep.rpy"]
|
||||
source = f"label a:\r\n{wrong}\r\n pass\r\n"
|
||||
assert renpy_builds.prepare_source("renpy/the-only-doe-0.05", "Sleep.rpy", source) == \
|
||||
f"label a:\r\n{fixed}\r\n pass\r\n"
|
||||
# another build, another file, or an edited line stays untouched
|
||||
assert renpy_builds.prepare_source(None, "sleep.rpy", source) == source
|
||||
assert renpy_builds.prepare_source("renpy/the-only-doe-0.05", "other.rpy", source) == source
|
||||
edited = source.replace("spitroast", "other")
|
||||
assert renpy_builds.prepare_source("renpy/the-only-doe-0.05", "sleep.rpy", edited) == edited
|
||||
Reference in new issue
Block a user