[PATCH 3 of 8 STABLE] page: test the 'enable' config option

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon May 1 12:12:45 EDT 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1493649390 -7200
#      Mon May 01 16:36:30 2017 +0200
# Branch stable
# Node ID ea4296acb04e7d3f7a1e163023c737ef6edf8bee
# Parent  447cfa40a5d135f73b0627a087e1308bda874fcc
# EXP-Topic pager
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r ea4296acb04e
page: test the 'enable' config option

While poking at this option I realised it was not tested.

diff --git a/tests/test-pager.t b/tests/test-pager.t
--- a/tests/test-pager.t
+++ b/tests/test-pager.t
@@ -52,6 +52,30 @@ By default diff and log are paged, but i
   $ hg id
   46106edeeb38 tip
 
+We can control the pager from the config
+
+  $ hg log --limit 1 --config 'pager.enable=False'
+  changeset:   10:46106edeeb38
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     modify a 10
+  
+  $ hg log --limit 1 --config 'pager.enable=0'
+  changeset:   10:46106edeeb38
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     modify a 10
+  
+  $ hg log --limit 1 --config 'pager.enable=1'
+  paged! 'changeset:   10:46106edeeb38\n'
+  paged! 'tag:         tip\n'
+  paged! 'user:        test\n'
+  paged! 'date:        Thu Jan 01 00:00:00 1970 +0000\n'
+  paged! 'summary:     modify a 10\n'
+  paged! '\n'
+
 We can enable the pager on id:
 
 BROKEN: should be paged


More information about the Mercurial-devel mailing list