diff tests/test-hgrc.t @ 28611:6aa17f86d9f0

test-hgrc: do not print ui.plain() flag at uisetup() This makes the test pass with chg. Since uisetup() is run per process, "hg showconfig" does not always call uisetup().
author Yuya Nishihara <yuya@tcha.org>
date Sun, 20 Mar 2016 15:09:29 -0700
parents 3aa50c9d89a0
children 3d2ea1403c62
line wrap: on
line diff
--- a/tests/test-hgrc.t	Sun Mar 20 12:25:46 2016 -0700
+++ b/tests/test-hgrc.t	Sun Mar 20 15:09:29 2016 -0700
@@ -184,8 +184,12 @@
 plain mode with exceptions
 
   $ cat > plain.py <<EOF
+  > from mercurial import commands, extensions
+  > def _config(orig, ui, repo, *values, **opts):
+  >     ui.write('plain: %r\n' % ui.plain())
+  >     return orig(ui, repo, *values, **opts)
   > def uisetup(ui):
-  >     ui.write('plain: %r\n' % ui.plain())
+  >     extensions.wrapcommand(commands.table, 'config', _config)
   > EOF
   $ echo "[extensions]" >> $HGRC
   $ echo "plain=./plain.py" >> $HGRC