Skip to content

Commit

Permalink
test: Convert remaining _parse_help unit test to pytest+pexpect
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jan 14, 2019
1 parent 5ecb9d7 commit a2c9da2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
7 changes: 7 additions & 0 deletions test/t/unit/test_unit_parse_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,10 @@ def test_29(self, bash):
output = assert_bash_exec(
bash, "echo '-f or --foo' | _parse_help -", want_output=True)
assert output.split() == "--foo".split()

def test_30(self, bash):
"""More than two dashes should not be treated as options."""
assert_bash_exec(bash,
r"fn() { printf '%s\n' $'----\n---foo\n----- bar'; }")
output = assert_bash_exec(bash, "_parse_help fn")
assert not output
21 changes: 0 additions & 21 deletions test/unit/_parse_help.exp

This file was deleted.

0 comments on commit a2c9da2

Please sign in to comment.