Mercurial > hg
annotate tests/test-revert-interactive-curses.t @ 45774:450e17e59603
commit: leverage cmdutil.check_incompatible_arguments()
Differential Revision: https://phab.mercurial-scm.org/D9218
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 15 Oct 2020 22:23:02 -0700 |
parents | 8b6a446508c2 |
children | e5e6282fa66a |
rev | line source |
---|---|
45153
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
1 #require tic |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
2 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
3 Revert interactive tests with the Curses interface |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
4 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
5 $ cat <<EOF >> $HGRCPATH |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
6 > [ui] |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
7 > interactive = true |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
8 > interface = curses |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
9 > [experimental] |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
10 > crecordtest = testModeCommands |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
11 > EOF |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
12 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
13 TODO: Make a curses version of the other tests from test-revert-interactive.t. |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
14 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
15 When a line without EOL is selected during "revert -i" |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
16 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
17 $ hg init $TESTTMP/revert-i-curses-eol |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
18 $ cd $TESTTMP/revert-i-curses-eol |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
19 $ echo 0 > a |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
20 $ hg ci -qAm 0 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
21 $ printf 1 >> a |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
22 $ hg ci -qAm 1 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
23 $ cat a |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
24 0 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
25 1 (no-eol) |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
26 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
27 $ cat <<EOF >testModeCommands |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
28 > c |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
29 > EOF |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
30 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
31 $ hg revert -ir'.^' |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
32 reverting a |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
33 $ cat a |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
34 0 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
35 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
36 When a selected line is reverted to have no EOL |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
37 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
38 $ hg init $TESTTMP/revert-i-curses-eol2 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
39 $ cd $TESTTMP/revert-i-curses-eol2 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
40 $ printf 0 > a |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
41 $ hg ci -qAm 0 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
42 $ echo 0 > a |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
43 $ hg ci -qAm 1 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
44 $ cat a |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
45 0 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
46 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
47 $ cat <<EOF >testModeCommands |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
48 > c |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
49 > EOF |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
50 |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
51 $ hg revert -ir'.^' |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
52 reverting a |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
53 $ cat a |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
54 0 (no-eol) |
8b6a446508c2
revert: fix interactive reverting of end-of-file newline changes
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents:
diff
changeset
|
55 |