Version 3.1.0: voice lines linked across all languages from the game data
This commit is contained in:
@@ -15,24 +15,24 @@ def run(capsys, *args):
|
||||
def test_cli_workflow(synth_game, tmp_path, capsys):
|
||||
root, originals = synth_game
|
||||
g = ["--game", root, "--lang", "INT"]
|
||||
out = run(capsys, "find", "radioscanner", *g)
|
||||
assert "CHR_RadioScanner_2" in out
|
||||
out = run(capsys, "find", "synth radio", *g)
|
||||
assert "Speech_Synth_Radio_02" in out
|
||||
wav = str(tmp_path / "line.wav")
|
||||
x, sr = synth.tone(1.0, 44100, 660)
|
||||
audio.save_wav(wav, x, sr)
|
||||
out = run(capsys, "replace", "CHR_RadioScanner_2", wav, *g)
|
||||
assert "replaced CHR_RadioScanner_2" in out
|
||||
assert "CHR_RadioScanner_2" in run(capsys, "status", *g)
|
||||
assert "modified" in run(capsys, "info", "CHR_RadioScanner_2", *g)
|
||||
out = run(capsys, "replace", "Speech_Synth_Radio_02", wav, *g)
|
||||
assert "replaced Speech_Synth_Radio_02" in out
|
||||
assert "Speech_Synth_Radio_02" in run(capsys, "status", *g)
|
||||
assert "modified" in run(capsys, "info", "Speech_Synth_Radio_02", *g)
|
||||
orig = str(tmp_path / "orig.wem")
|
||||
run(capsys, "extract", "CHR_RadioScanner_2", orig, *g)
|
||||
run(capsys, "extract", "Speech_Synth_Radio_02", orig, *g)
|
||||
assert open(orig, "rb").read() == originals["%08X:1" % synth.SPEECH_ENTRY]
|
||||
mod = str(tmp_path / "m.acmod")
|
||||
assert "1 sounds" in run(capsys, "export-mod", mod, *g)
|
||||
assert "reverted 1" in run(capsys, "revert", "--all", *g)
|
||||
assert "original" in run(capsys, "status", *g)
|
||||
assert "exact" in run(capsys, "import-mod", mod, *g)
|
||||
run(capsys, "revert", "CHR_RadioScanner_2", *g)
|
||||
run(capsys, "revert", "Speech_Synth_Radio_02", *g)
|
||||
|
||||
|
||||
def test_cli_errors_are_friendly(synth_game, capsys):
|
||||
|
||||
Reference in New Issue
Block a user