comparison tests/test-diff-color.t @ 12415:1ff3fc4b6a66

tests: unify test-diff-color
author Matt Mackall <mpm@selenic.com>
date Sun, 26 Sep 2010 13:41:32 -0500
parents tests/test-diff-color@d29bd00bbc50
children 05fffd665170
comparison
equal deleted inserted replaced
12414:858fe1e74785 12415:1ff3fc4b6a66
1 Setup
2
3 $ echo "[extensions]" >> $HGRCPATH
4 $ echo "color=" >> $HGRCPATH
5 $ hg init repo
6 $ cd repo
7 $ cat > a <<EOF
8 > c
9 > c
10 > a
11 > a
12 > b
13 > a
14 > a
15 > c
16 > c
17 > EOF
18 $ hg ci -Am adda
19 adding a
20 $ cat > a <<EOF
21 > c
22 > c
23 > a
24 > a
25 > dd
26 > a
27 > a
28 > c
29 > c
30 > EOF
31
32 default context
33
34 $ hg diff --nodates --color=always
35 diff -r cf9f4ba66af2 a
36 --- a/a
37 +++ b/a
38 @@ -2,7 +2,7 @@
39 c
40 a
41 a
42 -b
43 +dd
44 a
45 a
46 c
47
48 --unified=2
49
50 $ hg diff --nodates -U 2 --color=always
51 diff -r cf9f4ba66af2 a
52 --- a/a
53 +++ b/a
54 @@ -3,5 +3,5 @@
55 a
56 a
57 -b
58 +dd
59 a
60 a
61
62 diffstat
63
64 $ hg diff --stat --color=always
65 a | 2 +-
66 1 files changed, 1 insertions(+), 1 deletions(-)
67 $ echo "record=" >> $HGRCPATH
68 $ echo "[ui]" >> $HGRCPATH
69 $ echo "interactive=true" >> $HGRCPATH
70 $ echo "[diff]" >> $HGRCPATH
71 $ echo "git=True" >> $HGRCPATH
72
73 record
74
75 $ chmod 0755 a
76 $ hg record --color=always -m moda a <<EOF
77 > y
78 > y
79 > EOF
80 diff --git a/a b/a
81 old mode 100644
82 new mode 100755
83 1 hunks, 1 lines changed
84 examine changes to 'a'? [Ynsfdaq?]
85 @@ -2,7 +2,7 @@
86 c
87 a
88 a
89 -b
90 +dd
91 a
92 a
93 c
94 record this change to 'a'? [Ynsfdaq?]
95 $ echo
96
97 $ echo "[extensions]" >> $HGRCPATH
98 $ echo "mq=" >> $HGRCPATH
99 $ hg rollback
100 rolling back to revision 0 (undo commit)
101
102 qrecord
103
104 $ hg qrecord --color=always -m moda patch <<EOF
105 > y
106 > y
107 > EOF
108 diff --git a/a b/a
109 old mode 100644
110 new mode 100755
111 1 hunks, 1 lines changed
112 examine changes to 'a'? [Ynsfdaq?]
113 @@ -2,7 +2,7 @@
114 c
115 a
116 a
117 -b
118 +dd
119 a
120 a
121 c
122 record this change to 'a'? [Ynsfdaq?]
123 $ echo
124