changeset 31726:bdb72dd3957e

test-check-code: prevent files being added to the root directory Adding new files in the root directory is probably a mistake, and is usually discouraged [1]. The test catches it to avoid mistakes like [2]. Modify the test if files need to be added in the root. [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-July/086442.html [2]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095836.html
author Jun Wu <quark@fb.com>
date Wed, 29 Mar 2017 12:14:20 -0700
parents c777b12cdc9b
children 6be6e4becaaf
files tests/test-check-code.t
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-check-code.t	Wed Mar 29 09:54:34 2017 -0400
+++ b/tests/test-check-code.t	Wed Mar 29 12:14:20 2017 -0700
@@ -57,3 +57,20 @@
   ...         print('commands in debugcommands.py not sorted; first differing '
   ...               'command is %s; expected %s' % (commands[i], command))
   ...         break
+
+Prevent adding new files in the root directory accidentally.
+
+  $ hg files 'glob:*'
+  .editorconfig
+  .hgignore
+  .hgsigs
+  .hgtags
+  CONTRIBUTING
+  CONTRIBUTORS
+  COPYING
+  Makefile
+  README
+  hg
+  hgeditor
+  hgweb.cgi
+  setup.py