зеркало из https://github.com/mozilla/bugbug.git
Expand cleanup_dll regex to match .so and .dylib (#96)
This commit is contained in:
Родитель
9f78468a47
Коммит
8ef3e3da87
|
@ -149,7 +149,7 @@ def cleanup_hex(text):
|
|||
|
||||
|
||||
def cleanup_dll(text):
|
||||
return re.sub(r'\w+\.dll\b', '__DLL_NAME__', text)
|
||||
return re.sub(r'\w+(\.dll|\.so|\.dylib)\b', '__DLL_NAME__', text)
|
||||
|
||||
|
||||
def cleanup_synonyms(text):
|
||||
|
|
|
@ -48,6 +48,8 @@ def test_cleanup_hex():
|
|||
def test_cleanup_dll():
|
||||
tests = [
|
||||
('Crashing thread: 0 scdetour.dll scdetour.dll@0x2dd77', 'Crashing thread: 0 __DLL_NAME__ __DLL_NAME__@0x2dd77'),
|
||||
('Crash in libxul.so@0x287ad36 | libxul.so@0x270c062', 'Crash in __DLL_NAME__@0x287ad36 | __DLL_NAME__@0x270c062'),
|
||||
('Crash in libsystem_pthread.dylib@0x14fc', 'Crash in __DLL_NAME__@0x14fc')
|
||||
]
|
||||
for orig_text, cleaned_text in tests:
|
||||
assert bug_features.cleanup_dll(orig_text) == cleaned_text
|
||||
|
|
Загрузка…
Ссылка в новой задаче