Add tests for and fix #14

This commit is contained in:
Aaron Heise 2023-02-22 21:16:41 -06:00
parent a07ce53bf9
commit 458a2391df
No known key found for this signature in database
GPG key ID: 6BA54088C41DE8BF
5 changed files with 82 additions and 8 deletions

View file

@ -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: