# HG changeset patch # User Matt Harbison <matt_harbi...@yahoo.com> # Date 1523121020 14400 # Sat Apr 07 13:10:20 2018 -0400 # Node ID 69ead78af94459ca41e529d0ebfb24bd1d11c32c # Parent d83191e9749ba281b569ed67ad345406cedb095d tests: add a substitution pattern for HTTP error log dates
This will make tests with error log content less of a nuisance. I didn't roll it into to $LOGDATE$ because the regex got long and line wrapped. It didn't seem worth the obscurity. diff --git a/tests/common-pattern.py b/tests/common-pattern.py --- a/tests/common-pattern.py +++ b/tests/common-pattern.py @@ -71,10 +71,14 @@ substitutions = [ # (replacement patterns) br'$USUAL_BUNDLE2_CAPS_SERVER$' ), - # HTTP log dates + # HTTP access log dates (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "(GET|PUT|POST)', lambda m: br' - - [$LOGDATE$] "' + m.group(1) ), + # HTTP error log dates + (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] (HG error:|Exception)', + lambda m: br' - - [$ERRDATE$] ' + m.group(1) + ), # HTTP header dates- RFC 1123 (br'([Dd]ate): [A-Za-z]{3}, \d\d [A-Za-z]{3} \d{4} \d\d:\d\d:\d\d GMT', lambda m: br'%s: $HTTP_DATE$' % m.group(1) _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel