tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Automatic replacement seems better than trying to figure out a check-code rule. I didn't bother looking to see why the error message and file name is reversed in the annotate and histedit tests, based on Windows or not. I originally had this as a list of tuples, conditional on the platform. But there are a couple of 'No such file or directory' messages emitted by Mercurial itself, so unconditional is required for stability. There are also several variants of what I assume is 'connection refused' and 'unknown host' in test-clone.t and test-clonebundles.t for Docker, FreeBSD jails, etc. Yes, these are handled by (re) tags, but maybe it would be better to capture those strings in order to avoid whack-a-mole in future tests. All of this points to using a dictionary containing one or more strings-to-be-replaced values.
Showing
- tests/common-pattern.py 14 additions, 0 deletionstests/common-pattern.py
- tests/test-acl.t 1 addition, 1 deletiontests/test-acl.t
- tests/test-addremove.t 2 additions, 4 deletionstests/test-addremove.t
- tests/test-annotate.t 4 additions, 4 deletionstests/test-annotate.t
- tests/test-dispatch.t 2 additions, 3 deletionstests/test-dispatch.t
- tests/test-extdata.t 1 addition, 2 deletionstests/test-extdata.t
- tests/test-hgignore.t 1 addition, 1 deletiontests/test-hgignore.t
- tests/test-histedit-arguments.t 2 additions, 1 deletiontests/test-histedit-arguments.t
- tests/test-hook.t 1 addition, 1 deletiontests/test-hook.t
- tests/test-largefiles-update.t 4 additions, 8 deletionstests/test-largefiles-update.t
- tests/test-shelve.t 1 addition, 1 deletiontests/test-shelve.t
- tests/test-status-rev.t 1 addition, 2 deletionstests/test-status-rev.t
- tests/test-subrepo-git.t 2 additions, 1 deletiontests/test-subrepo-git.t
- tests/test-subrepo-svn.t 1 addition, 7 deletionstests/test-subrepo-svn.t
- tests/test-walk.t 1 addition, 1 deletiontests/test-walk.t
Loading
Please register or sign in to comment