comparison tests/test-status-rev.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 305935be8d5c
children 5abc47d4ca6b
comparison
equal deleted inserted replaced
35229:61ff0d7d56fd 35230:feecfefeba25
81 $ hg status -A --rev 1 'glob:missing_*_missing-tracked' 81 $ hg status -A --rev 1 'glob:missing_*_missing-tracked'
82 ! missing_content2_missing-tracked 82 ! missing_content2_missing-tracked
83 ! missing_missing_missing-tracked 83 ! missing_missing_missing-tracked
84 84
85 $ hg status -A --rev 1 'glob:missing_missing_missing-untracked' 85 $ hg status -A --rev 1 'glob:missing_missing_missing-untracked'
86 missing_missing_missing-untracked: The system cannot find the file specified (windows !) 86 missing_missing_missing-untracked: $ENOENT$
87 missing_missing_missing-untracked: No such file or directory (no-windows !)
88 87
89 Status between first and second commit. Should ignore dirstate status. 88 Status between first and second commit. Should ignore dirstate status.
90 89
91 $ hg status -A --rev 0:1 'glob:content1_content2_*' 90 $ hg status -A --rev 0:1 'glob:content1_content2_*'
92 M content1_content2_content1-tracked 91 M content1_content2_content1-tracked