diff options
Diffstat (limited to 'bindings/python/tests/cindex/test_translation_unit.py')
-rw-r--r-- | bindings/python/tests/cindex/test_translation_unit.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bindings/python/tests/cindex/test_translation_unit.py b/bindings/python/tests/cindex/test_translation_unit.py index c83c4972ed..f130db6aeb 100644 --- a/bindings/python/tests/cindex/test_translation_unit.py +++ b/bindings/python/tests/cindex/test_translation_unit.py @@ -25,6 +25,15 @@ def test_parse_arguments(): assert spellings[-2] == 'hello' assert spellings[-1] == 'hi' +def test_reparse_arguments(): + path = os.path.join(kInputsDir, 'parse_arguments.c') + index = Index.create() + tu = index.parse(path, ['-DDECL_ONE=hello', '-DDECL_TWO=hi']) + tu.reparse() + spellings = [c.spelling for c in tu.cursor.get_children()] + assert spellings[-2] == 'hello' + assert spellings[-1] == 'hi' + def test_unsaved_files(): index = Index.create() tu = index.parse('fake.c', ['-I./'], unsaved_files = [ |