2015-06-17 22:58:05 +02:00
|
|
|
import os
|
2015-06-17 23:23:15 +02:00
|
|
|
import platform
|
2015-06-17 22:58:05 +02:00
|
|
|
|
|
|
|
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():
|
2015-06-17 23:23:15 +02:00
|
|
|
if (platform.system() != 'Windows'):
|
|
|
|
man_completer = ManCompleter()
|
|
|
|
completions = man_completer.option_complete('--', 'yes')
|
|
|
|
assert_true('--version' in completions)
|
|
|
|
assert_true('--help' in completions)
|
2015-06-17 22:58:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
nose.runmodule()
|