Skip to content

Commit

Permalink
test: add bunch of basic _parse_help use test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed May 9, 2019
1 parent 44ed05a commit 6b4fd9b
Show file tree
Hide file tree
Showing 65 changed files with 263 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/t/test_2to3.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class Test2to3:
@pytest.mark.complete("2to3 ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("2to3 -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_a2x.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestA2x:
@pytest.mark.complete("a2x ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("a2x -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_aclocal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestAclocal:
@pytest.mark.complete("aclocal ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("aclocal -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_adb.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestAdb:
@pytest.mark.complete("adb ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("adb -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_asciidoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestAsciidoc:
@pytest.mark.complete("asciidoc ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("asciidoc -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_automake.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestAutomake:
@pytest.mark.complete("automake ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("automake -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_autoscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestAutoscan:
@pytest.mark.complete("autoscan ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("autoscan -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_bzip2.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ def test_1(self, completion):
@pytest.mark.complete("bzip2 ~")
def test_2(self, completion):
assert completion

@pytest.mark.complete("bzip2 -")
def test_3(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_chage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestChage:
@pytest.mark.complete("chage ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("chage -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ def test_1(self, completion):
@pytest.mark.complete("convert -format ")
def test_2(self, completion):
assert completion

@pytest.mark.complete("convert -")
def test_3(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_cryptsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestCryptsetup:
@pytest.mark.complete("cryptsetup ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("cryptsetup -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_cvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ def test_2(self, completion):
@pytest.mark.complete("cvs diff foo/", cwd="cvs")
def test_3(self, completion):
assert completion == "foo/bar"

@pytest.mark.complete("cvs -")
def test_4(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_desktop_file_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ class TestDesktopFileValidate:
@pytest.mark.complete("desktop-file-validate ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("desktop-file-validate -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_ecryptfs_migrate_home.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ class TestEcryptfsMigrateHome:
@pytest.mark.complete("ecryptfs-migrate-home ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("ecryptfs-migrate-home -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_eog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestEog:
@pytest.mark.complete("eog ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("eog -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_evince.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ def test_1(self, completion):
".ps.bz2 .ps.BZ2 .PS.bz2 .PS.BZ2 .ps.gz .ps.GZ .PS.gz .PS.GZ "
".tga .TGA .tif .TIF .tiff .TIFF .xpm .XPM .xwd .XWD".split()
)

@pytest.mark.complete("evince -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_fusermount.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestFusermount:
@pytest.mark.complete("fusermount ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("fusermount -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_genisoimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestGenisoimage:
@pytest.mark.complete("genisoimage ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("genisoimage -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_getent.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestGetent:
@pytest.mark.complete("getent ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("getent -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_gnokii.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestGnokii:
@pytest.mark.complete("gnokii ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("gnokii -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_gpasswd.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestGpasswd:
@pytest.mark.complete("gpasswd ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("gpasswd -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_groupdel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestGroupdel:
@pytest.mark.complete("groupdel ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("groupdel -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_gzip.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ def test_1(self, completion):
@pytest.mark.complete("gzip ~")
def test_2(self, completion):
assert completion

@pytest.mark.complete("gzip -")
def test_3(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_hcitool.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestHcitool:
@pytest.mark.complete("hcitool ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("hcitool -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_htpasswd.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ def test_3(self, completion):
@pytest.mark.complete("htpasswd -D htpasswd ", cwd="htpasswd")
def test_4(self, completion):
assert completion == "foo quux".split()

@pytest.mark.complete("htpasswd -")
def test_5(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_iftop.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestIftop:
@pytest.mark.complete("iftop ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("iftop -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_interdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestInterdiff:
@pytest.mark.complete("interdiff ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("interdiff -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_iperf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ def test_3(self, completion):
@pytest.mark.complete("iperf --server --")
def test_4(self, completion):
assert "--daemon" in completion

@pytest.mark.complete("iperf -")
def test_5(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_ipmitool.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestIpmitool:
@pytest.mark.complete("ipmitool ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("ipmitool -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_javaws.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestJavaws:
@pytest.mark.complete("javaws ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("javaws -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_jpegoptim.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestJpegoptim:
@pytest.mark.complete("jpegoptim ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("jpegoptim -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_jshint.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestJshint:
@pytest.mark.complete("jshint ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("jshint -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_k3b.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestK3b:
@pytest.mark.complete("k3b ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("k3b -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_killall.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ def test_2(self, completion):
@pytest.mark.complete("killall ")
def test_3(self, completion):
assert "command=" not in completion

@pytest.mark.complete("killall -")
def test_4(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_lftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ def test_1(self, bash, completion):
).split()
assert all(x in completion for x in hosts)
assert "lftptest" in completion # defined in lftp/.lftp/bookmarks

@pytest.mark.complete("lftp -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_lrzip.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ def test_1(self, completion):
@pytest.mark.complete("lrzip ~")
def test_2(self, completion):
assert completion

@pytest.mark.complete("lrzip -")
def test_3(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_luserdel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestLuserdel:
@pytest.mark.complete("luserdel ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("luserdel -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_lz4.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ def test_1(self, completion):
@pytest.mark.complete("lz4 ~")
def test_2(self, completion):
assert completion

@pytest.mark.complete("lz4 -")
def test_3(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_lzip.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestLzip:
@pytest.mark.complete("lzip ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("lzip -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_man.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,7 @@ def test_9(self, bash, completion):
)
def test_10(self, bash, colonpath, completion):
assert completion == "Bash::Completion"

@pytest.mark.complete("man -")
def test_11(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_mcrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ def test_2(self, completion):
@pytest.mark.complete("mcrypt -m ")
def test_3(self, completion):
assert completion

@pytest.mark.complete("mcrypt -")
def test_4(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_mii_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ class TestMiiTool:
@pytest.mark.complete("mii-tool ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("mii-tool -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_monodevelop.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestMonodevelop:
@pytest.mark.complete("monodevelop ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("monodevelop -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_newusers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestNewusers:
@pytest.mark.complete("newusers ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("newusers -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_optipng.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestOptipng:
@pytest.mark.complete("optipng ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("optipng -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestPatch:
@pytest.mark.complete("patch ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("patch -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_pdftotext.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestPdftotext:
@pytest.mark.complete("pdftotext ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("pdftotext -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_protoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestProtoc:
@pytest.mark.complete("protoc ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("protoc -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_pwdx.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestPwdx:
@pytest.mark.complete("pwdx ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("pwdx -")
def test_2(self, completion):
assert completion
4 changes: 4 additions & 0 deletions test/t/test_pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ class TestPydoc:
@pytest.mark.complete("pydoc r")
def test_1(self, completion):
assert completion

@pytest.mark.complete("pydoc -")
def test_2(self, completion):
assert completion
Loading

0 comments on commit 6b4fd9b

Please sign in to comment.