pager: test the 'enable' config option stable
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 01 May 2017 16:36:30 +0200
branchstable
changeset 32098 149440d7e1a7
parent 32097 601bfcddccdc
child 32099 7c76f3923b6a
pager: test the 'enable' config option While poking at this option I realised it was not tested.
tests/test-pager.t
--- a/tests/test-pager.t	Mon May 01 15:51:57 2017 +0200
+++ b/tests/test-pager.t	Mon May 01 16:36:30 2017 +0200
@@ -52,6 +52,30 @@
   $ 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