[libclang] python: expose a few functions, patch by Loïc Jaquemet!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191907 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/bindings/python/tests/cindex/test_type.py b/bindings/python/tests/cindex/test_type.py
index 62968d6..a02c06f 100644
--- a/bindings/python/tests/cindex/test_type.py
+++ b/bindings/python/tests/cindex/test_type.py
@@ -132,6 +132,22 @@
     assert a.type != None
     assert a.type != 'foo'
 
+def test_type_spelling():
+    """Ensure Type.spelling works."""
+    tu = get_tu('int c[5]; int i[]; int x; int v[x];')
+    c = get_cursor(tu, 'c')
+    i = get_cursor(tu, 'i')
+    x = get_cursor(tu, 'x')
+    v = get_cursor(tu, 'v')
+    assert c is not None
+    assert i is not None
+    assert x is not None
+    assert v is not None
+    assert c.type.spelling == "int [5]"
+    assert i.type.spelling == "int []"
+    assert x.type.spelling == "int"
+    assert v.type.spelling == "int [x]"
+
 def test_typekind_spelling():
     """Ensure TypeKind.spelling works."""
     tu = get_tu('int a;')