tests/common-pattern.py
changeset 35239 feecfefeba25
parent 35096 7f0c9e28a816
child 35240 b33d4cf38666
--- a/tests/common-pattern.py	Sun Dec 03 20:55:35 2017 -0800
+++ b/tests/common-pattern.py	Sat Dec 02 19:33:34 2017 -0500
@@ -37,3 +37,17 @@
      br' - - [$LOGDATE$] "GET'
     ),
 ]
+
+# Various platform error strings, keyed on a common replacement string
+_errors = {
+    br'$ENOENT$': (
+        # strerror()
+        br'No such file or directory',
+
+        # FormatMessage(ERROR_FILE_NOT_FOUND)
+        br'The system cannot find the file specified',
+    ),
+}
+
+for replace, msgs in _errors.items():
+    substitutions.extend((m, replace) for m in msgs)