File tree 2 files changed +34
-0
lines changed
2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Lines starting with '#' are comments.
2
+ # Each line is a file pattern followed by one or more owners.
3
+ # Owners of code are automatically nominated to review PRs involving that code.
4
+
5
+ # These owners will be the default owners for everything in the repo.
6
+ * @ tleonhardt
7
+
8
+ # Order is important. The last matching pattern has the most precedence.
9
+ # So if a pull request only touches javascript files, only these owners
10
+ # will be requested to review.
11
+ # *.js @octocat @github/js
12
+
13
+ # You can also use email addresses if you prefer.
14
+
Original file line number Diff line number Diff line change @@ -829,6 +829,26 @@ def test_default_to_shell_unknown(shell_app):
829
829
out = run_cmd (shell_app , unknown_command )
830
830
assert out == ["*** Unknown syntax: {}" .format (unknown_command )]
831
831
832
+ def test_default_to_shell_good (capsys ):
833
+ app = cmd2 .Cmd ()
834
+ app .default_to_shell = True
835
+ line = 'ls'
836
+ statement = app .parser_manager .parsed (line )
837
+ retval = app ._default (statement )
838
+ assert not retval
839
+ out , err = capsys .readouterr ()
840
+ assert out == ''
841
+
842
+ def test_default_to_shell_failure (capsys ):
843
+ app = cmd2 .Cmd ()
844
+ app .default_to_shell = True
845
+ line = 'ls does_not_exist.xyz'
846
+ statement = app .parser_manager .parsed (line )
847
+ retval = app ._default (statement )
848
+ assert not retval
849
+ out , err = capsys .readouterr ()
850
+ assert out == "*** Unknown syntax: {}\n " .format (line )
851
+
832
852
833
853
def test_ansi_prompt_not_esacped (base_app ):
834
854
prompt = '(Cmd) '
You can’t perform that action at this time.
0 commit comments