Commit Graph

15 Commits

Author SHA1 Message Date
Yuya Nishihara
ed7051c6c7 tests: write hgrc of more than two lines by using shell heredoc
Here document should be readable than repeating echo commands.
2014-11-04 23:41:46 +09:00
Mads Kiilerich
a195867192 eol: fix crash when handling removed files
ci --amend would in some cases fail after 2eef89bfd70d failed to refactor the
eol extension too.
2014-10-22 16:10:23 +02:00
Mads Kiilerich
f7215835a1 tests: convert some hghave unix-permissions to #if 2012-06-19 01:43:41 +02:00
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Mads Kiilerich
72ebeacea3 tests: use 'hghave unix-permissions' for tests that really use chmod
chmod of helper scripts is not included.

tests that exercise the x bit in the file system uses 'hghave execbit'.
2011-11-07 03:14:55 +01:00
Stepan Koltsov
a47a7047c8 eol: fix missing trailing newlines in comitted files
Some text editors (Eclipse, for example) do not add trailing newlines,
so diffs often contain annoying "\ No newline at the end of file".
This patch to eol extension simply adds trailing newline on commit.
2011-07-01 23:12:52 +04:00
Stepan Koltsov
8ad66e155c eol: eol.only-consistent can now be specified in .hgeol 2011-07-01 22:53:58 +04:00
Benoit Boissinot
ad1c73c37c tests: fix permission issue trying to remove test directory 2011-03-12 11:06:40 +01:00
Martin Geisler
83c27fb95f tests: don't overwrite HGRCPATH
Overwriting instead of appending to the file removes the [defaults]
section put into the file by run-tests.py.

It also defeats the --inotify option to run-tests.py.

(Nothing was broken yet, but the lack of -d "0 0" cause changeset
hashes to change unexpectedly in a test case I was editing.)
2011-03-01 17:01:17 +01:00
Martin Geisler
8ccb77ff7e eol: do not abort on parse error
Handle parse errors in the .hgeol similarly to how parse errors in the
.hgtags file are handled: by issuing a warning. This allows the user
to revert the file using 'hg revert' or 'hg update -C'.
2011-02-28 15:46:48 +01:00
Martin Geisler
010793c962 eol: fix test typos introduced in f5579c036148 2011-02-28 11:34:51 +01:00
Martin Geisler
3ff64e3e9e eol: test win32text compatible encode/decode filters 2011-02-28 11:31:36 +01:00
Martin Geisler
da42b93613 eol: handle LockUnavailable error (issue2569)
If the repository is not locked when clearing the dirstate, then
running test-eol.t in a loop fails sooner or later with:

  ERROR: /home/mg/src/mercurial-crew/tests/test-eol.t output changed
  --- /home/mg/src/mercurial-crew/tests/test-eol.t
  +++ /home/mg/src/mercurial-crew/tests/test-eol.t.err
  @@ -343,6 +343,7 @@
     % hg status (eol activated)
     M win.txt
     % hg commit
  +  nothing changed
     % hg status
     $ testmixed CRLF

However, if we cannot lock the repository, then we can also not make a
commit and so we can simply ignore a LockUnavailable error.
2011-02-25 12:32:15 +01:00
Mads Kiilerich
8e085520f4 tests: use (esc) instead of other kinds of string escaping 2010-11-08 01:41:42 +01:00
Matt Mackall
eb2a743084 tests: unify test-eol 2010-09-26 13:41:32 -05:00