Mercurial > hg
comparison tests/test-histedit-arguments.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 | 7f183c643eb6 |
children | 4441705b7111 |
comparison
equal
deleted
inserted
replaced
35229:61ff0d7d56fd | 35230:feecfefeba25 |
---|---|
352 Corrupt histedit state file | 352 Corrupt histedit state file |
353 $ sed 's/8fda0c726bf2/123456789012/' .hg/histedit-state > ../corrupt-histedit | 353 $ sed 's/8fda0c726bf2/123456789012/' .hg/histedit-state > ../corrupt-histedit |
354 $ mv ../corrupt-histedit .hg/histedit-state | 354 $ mv ../corrupt-histedit .hg/histedit-state |
355 $ hg histedit --abort | 355 $ hg histedit --abort |
356 warning: encountered an exception during histedit --abort; the repository may not have been completely cleaned up | 356 warning: encountered an exception during histedit --abort; the repository may not have been completely cleaned up |
357 abort: .*(No such file or directory:|The system cannot find the file specified).* (re) | 357 abort: $TESTTMP/foo/.hg/strip-backup/*-histedit.hg: $ENOENT$ (glob) (windows !) |
358 abort: $ENOENT$: $TESTTMP/foo/.hg/strip-backup/*-histedit.hg (glob) (no-windows !) | |
358 [255] | 359 [255] |
359 Histedit state has been exited | 360 Histedit state has been exited |
360 $ hg summary -q | 361 $ hg summary -q |
361 parent: 5:63379946892c | 362 parent: 5:63379946892c |
362 commit: 1 added, 1 unknown (new branch head) | 363 commit: 1 added, 1 unknown (new branch head) |