[PATCH] test-bad-pull: adjust for Windows
Adrian Buehlmann
adrian at cadifra.com
Tue Jun 19 10:09:32 CDT 2012
On 2012-06-19 16:30, Mads Kiilerich wrote:
> On 19/06/12 15:59, Adrian Buehlmann wrote:
>> # HG changeset patch
>> # User Adrian Buehlmann <adrian at cadifra.com>
>> # Date 1340113978 -7200
>> # Node ID 1fd587a481b5afee357dd503e138f306ca762caa
>> # Parent 79902f7e27df0eeae96d4d47d5c8a12fae2a0bb7
>> test-bad-pull: adjust for Windows
>>
>> On Windows, the test fails with a different error message
>>
>> diff --git a/tests/test-bad-pull.t b/tests/test-bad-pull.t
>> --- a/tests/test-bad-pull.t
>> +++ b/tests/test-bad-pull.t
>> @@ -1,8 +1,14 @@
>> $ "$TESTDIR/hghave" serve || exit 80
>>
>> +#if windows
>> + $ hg clone http://localhost:$HGPORT/ copy
>> + abort: error: No connection could be made because the target machine actively refused it
>> + [255]
>> +#else
>> $ hg clone http://localhost:$HGPORT/ copy
>> abort: error: Connection refused
>> [255]
>> +#endif
>
> AFAIK the windows error messages are localized and hardcoded at install
> time, so if we want to be able to run the tests on non-US machines then
> we would have to ignore all windows error messages. Do that make sense
> and match your reality ... or will this work on for example a German
> windows?
You're absolutely right, thanks.
It most definitely won't work on e.g. a German Windows.
Even though I'm a native Swiss (Swiss-German speaking), I happen to
(prefer and) use an English Windows 7 here. (And I constantly forget
about it).
> The unix messages in the C localization happens to be more stable, but
> we have been forced to ignoring them in several places (grep
> 'abort:.*\*.*(glob)' *.t). It might thus make sense to glob problematic
> error messages on all platforms when they are encountered.
More information about the Mercurial-devel
mailing list