summaryrefslogtreecommitdiff
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-06-11 20:48:03 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-06-11 20:48:03 -0400
commit0d4e633e8e0698cecc851af2f8967b6ead0e748b (patch)
tree26f9634a091cd10709415dbb4f1d22d8335d770e /tests/conftest.py
parent3ae71e80e61a908ad0a0dec84ee6496592176022 (diff)
downloadcmd2-git-0d4e633e8e0698cecc851af2f8967b6ead0e748b.tar.gz
Added pager settable parameter to control the command used to display paged output
Also: - ppaged() now uses the pager settable parameter - By default the pager settable parameter uses the PAGER environment variable if present - If PAGER environment variable is not present, pager gets set to: - "less -SXRF" on POSIX OSes (macOS and Linux) - "more" on Windows
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 90d45bd9..a935c4f7 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -80,8 +80,10 @@ SHORTCUTS_TXT = """Shortcuts for other commands:
"""
expect_colors = True
+pager = 'less -SRXF'
if sys.platform.startswith('win'):
expect_colors = False
+ pager = 'more'
# Output from the show command with default settings
SHOW_TXT = """colors: {}
continuation_prompt: >
@@ -90,10 +92,11 @@ echo: False
editor: vim
feedback_to_output: False
locals_in_py: False
+pager: {}
prompt: (Cmd)
quiet: False
timing: False
-""".format(expect_colors)
+""".format(expect_colors, pager)
if expect_colors:
color_str = 'True '
@@ -107,10 +110,11 @@ echo: False # Echo command issued into output
editor: vim # Program used by ``edit``
feedback_to_output: False # Include nonessentials in `|`, `>` results
locals_in_py: False # Allow access to your application in py via self
+pager: {} # Command used for displaying paged output
prompt: (Cmd) # The prompt issued to solicit input
quiet: False # Don't print nonessential feedback
timing: False # Report execution times
-""".format(color_str)
+""".format(color_str, pager)
class StdOut(object):