Mercurial > hg-stable
comparison tests/test-hgignore.t @ 25869:a72e304df528 stable
test: move ignore test run into a subdirectory
Previously the hgignore test just called hg init in the test directory. A future
patch needs to test hgignore stuff from outside of the repo, so let's move the
entire test repo into a subdirectory.
author | Durham Goode <durham@fb.com> |
---|---|
date | Fri, 24 Jul 2015 16:43:21 -0700 |
parents | 19d0e5efa6ca |
children | 3de48ff62733 |
comparison
equal
deleted
inserted
replaced
25868:777235417457 | 25869:a72e304df528 |
---|---|
1 $ hg init | 1 $ hg init ignorerepo |
2 $ cd ignorerepo | |
2 | 3 |
3 Issue562: .hgignore requires newline at end: | 4 Issue562: .hgignore requires newline at end: |
4 | 5 |
5 $ touch foo | 6 $ touch foo |
6 $ touch bar | 7 $ touch bar |
42 ? dir/c.o | 43 ? dir/c.o |
43 ? syntax | 44 ? syntax |
44 | 45 |
45 $ echo "*.o" > .hgignore | 46 $ echo "*.o" > .hgignore |
46 $ hg status | 47 $ hg status |
47 abort: $TESTTMP/.hgignore: invalid pattern (relre): *.o (glob) | 48 abort: $TESTTMP/ignorerepo/.hgignore: invalid pattern (relre): *.o (glob) |
48 [255] | 49 [255] |
49 | 50 |
50 $ echo ".*\.o" > .hgignore | 51 $ echo ".*\.o" > .hgignore |
51 $ hg status | 52 $ hg status |
52 A dir/b.o | 53 A dir/b.o |
67 Test that patterns from ui.ignore options are read: | 68 Test that patterns from ui.ignore options are read: |
68 | 69 |
69 $ echo > .hgignore | 70 $ echo > .hgignore |
70 $ cat >> $HGRCPATH << EOF | 71 $ cat >> $HGRCPATH << EOF |
71 > [ui] | 72 > [ui] |
72 > ignore.other = $TESTTMP/.hg/testhgignore | 73 > ignore.other = $TESTTMP/ignorerepo/.hg/testhgignore |
73 > EOF | 74 > EOF |
74 $ echo "glob:**.o" > .hg/testhgignore | 75 $ echo "glob:**.o" > .hg/testhgignore |
75 $ hg status | 76 $ hg status |
76 A dir/b.o | 77 A dir/b.o |
77 ? .hgignore | 78 ? .hgignore |
105 ? a.c | 106 ? a.c |
106 ? syntax | 107 ? syntax |
107 | 108 |
108 $ echo "syntax: invalid" > .hgignore | 109 $ echo "syntax: invalid" > .hgignore |
109 $ hg status | 110 $ hg status |
110 $TESTTMP/.hgignore: ignoring invalid syntax 'invalid' (glob) | 111 $TESTTMP/ignorerepo/.hgignore: ignoring invalid syntax 'invalid' (glob) |
111 A dir/b.o | 112 A dir/b.o |
112 ? .hgignore | 113 ? .hgignore |
113 ? a.c | 114 ? a.c |
114 ? a.o | 115 ? a.o |
115 ? dir/c.o | 116 ? dir/c.o |