summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-02-05 20:19:02 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-02-05 20:19:02 -0500
commitdef2bb90533f72ddd4b8909c0160cf643e19f765 (patch)
treea73848d752e6dd4491f7d4161d77a21e2f170a0f /tests
parent65959e43b5c81443058d3f79225163bc7d2814e5 (diff)
downloadcmd2-git-def2bb90533f72ddd4b8909c0160cf643e19f765.tar.gz
Documented undocumented commands and removed command aliases.
The out-of-the-box help menu now looks a lot cleaner: - All redundant command aliases have been removed (NOTE: They can still be used if self.abbrev is True, which is the default) - All previously undocumented commands have been documented - Unit tests and README.rst documentation has been updated to reflect new behavior
Diffstat (limited to 'tests')
-rw-r--r--tests/conftest.py9
-rw-r--r--tests/test_cmd2.py4
-rw-r--r--tests/test_transcript.py9
-rw-r--r--tests/transcript.txt9
4 files changed, 8 insertions, 23 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 7bbefd6d..530c70a1 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -14,13 +14,8 @@ import cmd2
# Help text for base cmd2.Cmd application
BASE_HELP = """Documented commands (type help <topic>):
========================================
-_load ed history list py save shortcuts
-_relative_load edit l load r set show
-cmdenvironment hi li pause run shell
-
-Undocumented commands:
-======================
-EOF eof exit help q quit
+_relative_load edit help list pause quit save shell show
+cmdenvironment eof history load py run set shortcuts
"""
# Help text for the history command
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 33c4acb3..e88c4c18 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -346,9 +346,9 @@ def test_pipe_to_shell(base_app):
out = run_cmd(base_app, 'help help | wc')
if sys.platform == "win32":
- expected = normalize("1 5 24")
+ expected = normalize("1 11 70")
else:
- expected = normalize("1 5 20")
+ expected = normalize("1 11 66")
assert out[0].strip() == expected[0].strip()
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index aeadae4e..d699f545 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -105,13 +105,8 @@ def test_base_with_transcript(_cmdline_app):
Documented commands (type help <topic>):
========================================
-_load ed history list pause run set show
-_relative_load edit l load py save shell speak
-cmdenvironment hi li orate r say shortcuts
-
-Undocumented commands:
-======================
-EOF eof exit help q quit
+_relative_load edit help list orate py run say shell show
+cmdenvironment eof history load pause quit save set shortcuts speak
(Cmd) help say
Repeats what you tell me to.
diff --git a/tests/transcript.txt b/tests/transcript.txt
index 91f27dff..1e10ee31 100644
--- a/tests/transcript.txt
+++ b/tests/transcript.txt
@@ -2,13 +2,8 @@
Documented commands (type help <topic>):
========================================
-_load ed history list pause run set show
-_relative_load edit l load py save shell speak
-cmdenvironment hi li orate r say shortcuts
-
-Undocumented commands:
-======================
-EOF eof exit help q quit
+_relative_load edit help list orate py run say shell show
+cmdenvironment eof history load pause quit save set shortcuts speak
(Cmd) help say
Repeats what you tell me to.