1from clang.cindex import Index, File
2
3def test_file():
4  index = Index.create()
5  tu = index.parse('t.c', unsaved_files = [('t.c', "")])
6  file = File.from_name(tu, "t.c")
7  assert str(file) == "t.c"
8  assert file.name == "t.c"
9  assert repr(file) == "<File: t.c>"
10