Mercurial > hg
comparison tests/test-hgignore.t @ 35230:feecfefeba25
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.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 02 Dec 2017 19:33:34 -0500 |
parents | e9672de52a23 |
children | 4441705b7111 |
comparison
equal
deleted
inserted
replaced
35229:61ff0d7d56fd | 35230:feecfefeba25 |
---|---|
263 A dir/b.o | 263 A dir/b.o |
264 | 264 |
265 $ cp otherignore goodignore | 265 $ cp otherignore goodignore |
266 $ echo "include:badignore" >> otherignore | 266 $ echo "include:badignore" >> otherignore |
267 $ hg status | 267 $ hg status |
268 skipping unreadable pattern file 'badignore': No such file or directory | 268 skipping unreadable pattern file 'badignore': $ENOENT$ |
269 A dir/b.o | 269 A dir/b.o |
270 | 270 |
271 $ mv goodignore otherignore | 271 $ mv goodignore otherignore |
272 | 272 |
273 Check using 'include:' while in a non-root directory | 273 Check using 'include:' while in a non-root directory |