[Scummvm-git-logs] scummvm master -> a1a31748e8ecf9aa4b7066ff912f076e96d982d3
rvanlaar
roland at rolandvanlaar.nl
Sun Aug 8 22:11:34 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a1a31748e8 DEVTOOLS: COMPANION: change escape char
Commit: a1a31748e8ecf9aa4b7066ff912f076e96d982d3
https://github.com/scummvm/scummvm/commit/a1a31748e8ecf9aa4b7066ff912f076e96d982d3
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2021-08-09T00:09:52+02:00
Commit Message:
DEVTOOLS: COMPANION: change escape char
\x81 is used to encode escaped chars. This change brings it in line with
the dumpercompanion.pl.
Changed paths:
devtools/dumper-companion.py
diff --git a/devtools/dumper-companion.py b/devtools/dumper-companion.py
index d379eaf27c..1cb0dc8f1b 100755
--- a/devtools/dumper-companion.py
+++ b/devtools/dumper-companion.py
@@ -53,7 +53,7 @@ def file_to_macbin(f: machfs.File, name: str, encoding: str) -> bytes:
def escape_string(s: str) -> str:
new_name = [
- "\x80" + chr(0x80 + ord(i)) if i in '/":*[]+|\\?%<>,;=' or ord(i) < 0x20 else i
+ "\x81" + chr(0x80 + ord(i)) if i in '/":*[]+|\\?%<>,;=' or ord(i) < 0x20 else i
for i in s
]
return "".join(new_name)
@@ -173,23 +173,23 @@ def call_test_parser(input_args: List[str]) -> Any:
def test_encode_string(capsys):
call_test_parser(["str", "Icon\r"])
captured = capsys.readouterr()
- assert captured.out == "xn--Icon-ea2f\n"
+ assert captured.out == "xn--Icon-ja6e\n"
def test_encode_stdin(capsys, monkeypatch):
monkeypatch.setattr("sys.stdin", io.StringIO("Icon\r"))
call_test_parser(["str", "--stdin"])
captured = capsys.readouterr()
- assert captured.out == "xn--Icon-ea2f\n"
+ assert captured.out == "xn--Icon-ja6e\n"
def test_decode_name():
- checks = [["Icon\r", "xn--Icon-ea2f"]]
+ checks = [["Icon\r", "xn--Icon-ja6e"]]
for input, expected in checks:
assert punyencode(input, "mac_roman") == expected
def test_escape_string():
- checks = [["\r", "\x80\x8d"]]
+ checks = [["\r", "\x81\x8d"]]
for input, expected in checks:
assert escape_string(input) == expected
More information about the Scummvm-git-logs
mailing list