OILS / builtin / misc_osh_test.py View on Github | oilshell.org

28 lines, 15 significant
1#!/usr/bin/env python2
2from __future__ import print_function
3
4import unittest
5
6from core import pyutil
7try:
8 from _devbuild.gen.help_meta import TOPICS
9except ImportError:
10 TOPICS = None # minimal dev build
11
12from builtin import misc_osh # module under test
13
14
15class BuiltinTest(unittest.TestCase):
16
17 def testPrintHelp(self):
18 # Localization: Optionally use GNU gettext()? For help only. Might be
19 # useful in parser error messages too. Good thing both kinds of code are
20 # generated? Because I don't want to deal with a C toolchain for it.
21
22 loader = pyutil.GetResourceLoader()
23 errfmt = None
24 misc_osh.Help('ysh', loader, TOPICS, errfmt)
25
26
27if __name__ == '__main__':
28 unittest.main()