annotate tests/test-eolfilename.t @ 13955:86b5cc1e8be8 stable

help config: explain that config files do not exist by default Inspired by critique given on StackOverflow where a user writes: I can have a good guess at what "%USERPROFILE%" might signify but none of the files listed in the "hg help config" output exist after running the installer. Previous experience would suggest that missing files mean something somewhere has gone seriously wrong. http://stackoverflow.com/questions/2329023/2351139#2351139
author Martin Geisler <mg@lazybytes.net>
date Mon, 18 Apr 2011 13:57:22 +0200
parents 05fffd665170
children 03f3ce7ca2a8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12425
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
1 http://mercurial.selenic.com/bts/issue352
3607
f4c9bb4ad7b1 issue352: disallow '\n' and '\r' in filenames (dirstate and manifest)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
2
12425
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
3 $ "$TESTDIR/hghave" eol-in-paths || exit 80
3607
f4c9bb4ad7b1 issue352: disallow '\n' and '\r' in filenames (dirstate and manifest)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
4
12425
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
5 test issue352
3607
f4c9bb4ad7b1 issue352: disallow '\n' and '\r' in filenames (dirstate and manifest)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
6
12425
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
7 $ hg init foo
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
8 $ cd foo
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
9 $ A=`printf 'he\rllo'`
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
10 $ echo foo > "$A"
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
11 $ hg add
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12425
diff changeset
12 adding he\rllo (esc)
12425
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
13 abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
14 [255]
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
15 $ hg ci -A -m m
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12425
diff changeset
16 adding he\rllo (esc)
12425
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
17 abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
18 [255]
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
19 $ rm "$A"
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
20 $ echo foo > "hell
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
21 > o"
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
22 $ hg add
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
23 adding hell
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
24 o
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
25 abort: '\n' and '\r' disallowed in filenames: 'hell\no'
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
26 [255]
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
27 $ hg ci -A -m m
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
28 adding hell
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
29 o
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
30 abort: '\n' and '\r' disallowed in filenames: 'hell\no'
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
31 [255]
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
32 $ echo foo > "$A"
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
33 $ hg debugwalk
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12425
diff changeset
34 f he\rllo he\rllo (esc)
12425
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
35 f hell
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
36 o hell
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
37 o
10475
2253715fde97 color: don't crash on invalid status codes (issue2036)
Brodie Rao <me+hg@dackz.net>
parents: 8936
diff changeset
38
12425
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
39 http://mercurial.selenic.com/bts/issue2036
10475
2253715fde97 color: don't crash on invalid status codes (issue2036)
Brodie Rao <me+hg@dackz.net>
parents: 8936
diff changeset
40
12425
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
41 $ cd ..
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
42
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
43 test issue2039
10475
2253715fde97 color: don't crash on invalid status codes (issue2036)
Brodie Rao <me+hg@dackz.net>
parents: 8936
diff changeset
44
12425
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
45 $ hg init bar
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
46 $ cd bar
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
47 $ echo "[extensions]" >> $HGRCPATH
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
48 $ echo "color=" >> $HGRCPATH
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
49 $ A=`printf 'foo\nbar'`
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
50 $ B=`printf 'foo\nbar.baz'`
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
51 $ touch "$A"
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
52 $ touch "$B"
fcf55506c2f4 tests: unify test-eolfilename
Matt Mackall <mpm@selenic.com>
parents: 10475
diff changeset
53 $ hg status --color=always
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12425
diff changeset
54 \x1b[0;35;1;4m? foo\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12425
diff changeset
55 \x1b[0;35;1;4mbar\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12425
diff changeset
56 \x1b[0;35;1;4m? foo\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12425
diff changeset
57 \x1b[0;35;1;4mbar.baz\x1b[0m (esc)