Patchwork [1,of,2,V2] test-hgignore: add testing for ui.ignore

login
register
mail settings
Submitter Siddharth Agarwal
Date Dec. 18, 2014, 4:54 a.m.
Message ID <a0103901de548b143d37.1418878442@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/7165/
State Accepted
Headers show

Comments

Siddharth Agarwal - Dec. 18, 2014, 4:54 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1418871218 28800
#      Wed Dec 17 18:53:38 2014 -0800
# Node ID a0103901de548b143d3764b27783b9c0acaba185
# Parent  495bc1b65d25872324a0220354f048b220304bd1
test-hgignore: add testing for ui.ignore

I couldn't find any tests for this, and we're going to make changes here in
upcoming patches.

Patch

diff --git a/tests/test-hgignore.t b/tests/test-hgignore.t
--- a/tests/test-hgignore.t
+++ b/tests/test-hgignore.t
@@ -64,13 +64,22 @@ 
   ? dir/c.o
   ? syntax
 
-  $ echo "glob:**.o" > .hgignore
+Test that patterns from ui.ignore options are read:
+
+  $ echo > .hgignore
+  $ cat >> $HGRCPATH << EOF
+  > [ui]
+  > ignore.other = $TESTTMP/.hg/testhgignore
+  > EOF
+  $ echo "glob:**.o" > .hg/testhgignore
   $ hg status
   A dir/b.o
   ? .hgignore
   ? a.c
   ? syntax
 
+empty out testhgignore
+  $ echo > .hg/testhgignore
   $ echo "glob:*.o" > .hgignore
   $ hg status
   A dir/b.o