mirror of
https://github.com/markqvist/rnsh.git
synced 2025-05-10 18:15:16 -04:00
Add tests for and fix #14
This commit is contained in:
parent
a07ce53bf9
commit
458a2391df
5 changed files with 82 additions and 8 deletions
|
@ -33,11 +33,26 @@ def test_program_initiate_no_args():
|
|||
args = rnsh.args.Args(shlex.split("rnsh one"))
|
||||
assert not args.listen
|
||||
assert args.destination == "one"
|
||||
assert not args.no_id
|
||||
assert args.command_line == []
|
||||
except docopt.DocoptExit:
|
||||
docopt_threw = True
|
||||
assert not docopt_threw
|
||||
|
||||
|
||||
def test_program_initiate_no_auth():
|
||||
docopt_threw = False
|
||||
try:
|
||||
args = rnsh.args.Args(shlex.split("rnsh -N one"))
|
||||
assert not args.listen
|
||||
assert args.destination == "one"
|
||||
assert args.no_id
|
||||
assert args.command_line == []
|
||||
except docopt.DocoptExit:
|
||||
docopt_threw = True
|
||||
assert not docopt_threw
|
||||
|
||||
|
||||
def test_program_initiate_dash_args():
|
||||
docopt_threw = False
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue