comparison tests/test-diff-color.t @ 12942:05fffd665170 stable

tests: use (esc) for all non-ASCII test output
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 08 Nov 2010 01:41:41 +0100
parents 1ff3fc4b6a66
children 1e497df514e2
comparison
equal deleted inserted replaced
12941:b911cb80c671 12942:05fffd665170
30 > EOF 30 > EOF
31 31
32 default context 32 default context
33 33
34 $ hg diff --nodates --color=always 34 $ hg diff --nodates --color=always
35 diff -r cf9f4ba66af2 a 35 \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc)
36 --- a/a 36 \x1b[0;31;1m--- a/a\x1b[0m (esc)
37 +++ b/a 37 \x1b[0;32;1m+++ b/a\x1b[0m (esc)
38 @@ -2,7 +2,7 @@ 38 \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
39 c 39 c
40 a 40 a
41 a 41 a
42 -b 42 \x1b[0;31m-b\x1b[0m (esc)
43 +dd 43 \x1b[0;32m+dd\x1b[0m (esc)
44 a 44 a
45 a 45 a
46 c 46 c
47 47
48 --unified=2 48 --unified=2
49 49
50 $ hg diff --nodates -U 2 --color=always 50 $ hg diff --nodates -U 2 --color=always
51 diff -r cf9f4ba66af2 a 51 \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc)
52 --- a/a 52 \x1b[0;31;1m--- a/a\x1b[0m (esc)
53 +++ b/a 53 \x1b[0;32;1m+++ b/a\x1b[0m (esc)
54 @@ -3,5 +3,5 @@ 54 \x1b[0;35m@@ -3,5 +3,5 @@\x1b[0m (esc)
55 a 55 a
56 a 56 a
57 -b 57 \x1b[0;31m-b\x1b[0m (esc)
58 +dd 58 \x1b[0;32m+dd\x1b[0m (esc)
59 a 59 a
60 a 60 a
61 61
62 diffstat 62 diffstat
63 63
64 $ hg diff --stat --color=always 64 $ hg diff --stat --color=always
65 a | 2 +- 65 a | 2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc)
66 1 files changed, 1 insertions(+), 1 deletions(-) 66 1 files changed, 1 insertions(+), 1 deletions(-)
67 $ echo "record=" >> $HGRCPATH 67 $ echo "record=" >> $HGRCPATH
68 $ echo "[ui]" >> $HGRCPATH 68 $ echo "[ui]" >> $HGRCPATH
69 $ echo "interactive=true" >> $HGRCPATH 69 $ echo "interactive=true" >> $HGRCPATH
70 $ echo "[diff]" >> $HGRCPATH 70 $ echo "[diff]" >> $HGRCPATH
75 $ chmod 0755 a 75 $ chmod 0755 a
76 $ hg record --color=always -m moda a <<EOF 76 $ hg record --color=always -m moda a <<EOF
77 > y 77 > y
78 > y 78 > y
79 > EOF 79 > EOF
80 diff --git a/a b/a 80 \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc)
81 old mode 100644 81 \x1b[0;36;1mold mode 100644\x1b[0m (esc)
82 new mode 100755 82 \x1b[0;36;1mnew mode 100755\x1b[0m (esc)
83 1 hunks, 1 lines changed 83 1 hunks, 1 lines changed
84 examine changes to 'a'? [Ynsfdaq?] 84 examine changes to 'a'? [Ynsfdaq?]
85 @@ -2,7 +2,7 @@ 85 \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
86 c 86 c
87 a 87 a
88 a 88 a
89 -b 89 \x1b[0;31m-b\x1b[0m (esc)
90 +dd 90 \x1b[0;32m+dd\x1b[0m (esc)
91 a 91 a
92 a 92 a
93 c 93 c
94 record this change to 'a'? [Ynsfdaq?] 94 record this change to 'a'? [Ynsfdaq?]
95 $ echo 95 $ echo
103 103
104 $ hg qrecord --color=always -m moda patch <<EOF 104 $ hg qrecord --color=always -m moda patch <<EOF
105 > y 105 > y
106 > y 106 > y
107 > EOF 107 > EOF
108 diff --git a/a b/a 108 \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc)
109 old mode 100644 109 \x1b[0;36;1mold mode 100644\x1b[0m (esc)
110 new mode 100755 110 \x1b[0;36;1mnew mode 100755\x1b[0m (esc)
111 1 hunks, 1 lines changed 111 1 hunks, 1 lines changed
112 examine changes to 'a'? [Ynsfdaq?] 112 examine changes to 'a'? [Ynsfdaq?]
113 @@ -2,7 +2,7 @@ 113 \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
114 c 114 c
115 a 115 a
116 a 116 a
117 -b 117 \x1b[0;31m-b\x1b[0m (esc)
118 +dd 118 \x1b[0;32m+dd\x1b[0m (esc)
119 a 119 a
120 a 120 a
121 c 121 c
122 record this change to 'a'? [Ynsfdaq?] 122 record this change to 'a'? [Ynsfdaq?]
123 $ echo 123 $ echo