mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 00:14:41 +01:00
tests for man completion
This commit is contained in:
parent
ec703afacc
commit
e559e4c5a3
2 changed files with 18 additions and 0 deletions
BIN
tests/man1/yes.1.gz
Normal file
BIN
tests/man1/yes.1.gz
Normal file
Binary file not shown.
18
tests/test_man.py
Normal file
18
tests/test_man.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import os
|
||||
|
||||
import nose
|
||||
from nose.tools import assert_true
|
||||
|
||||
from xonsh.completer import ManCompleter
|
||||
|
||||
os.environ['MANPATH'] = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
def test_man_completion():
|
||||
man_completer = ManCompleter()
|
||||
completions = man_completer.option_complete('--', 'yes')
|
||||
assert_true('--version' in completions)
|
||||
assert_true('--help' in completions)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
nose.runmodule()
|
Loading…
Add table
Reference in a new issue