1 | #!/usr/bin/env python2
|
2 | from __future__ import print_function
|
3 |
|
4 | import unittest
|
5 |
|
6 | from _devbuild.gen.id_kind_asdl import Id
|
7 | from core import test_lib
|
8 | from builtin import bracket_osh # module under test
|
9 |
|
10 |
|
11 | class BracketTest(unittest.TestCase):
|
12 |
|
13 | def testStringWordEmitter(self):
|
14 | # Test
|
15 | argv = '-z X -o -z Y -a -z X'.split()
|
16 | cmd_val = test_lib.MakeBuiltinArgv(argv)
|
17 | e = bracket_osh._StringWordEmitter(cmd_val)
|
18 | while True:
|
19 | w = e.ReadWord(None)
|
20 | print(w)
|
21 | if w.id == Id.Eof_Real:
|
22 | break
|
23 |
|
24 |
|
25 | if __name__ == '__main__':
|
26 | unittest.main()
|