mirror of
https://github.com/opnsense/src.git
synced 2026-03-07 07:44:13 -05:00
9 lines
265 B
Python
9 lines
265 B
Python
from clang.cindex import Index, File
|
|
|
|
def test_file():
|
|
index = Index.create()
|
|
tu = index.parse('t.c', unsaved_files = [('t.c', "")])
|
|
file = File.from_name(tu, "t.c")
|
|
assert str(file) == "t.c"
|
|
assert file.name == "t.c"
|
|
assert repr(file) == "<File: t.c>"
|