summaryrefslogtreecommitdiff
path: root/test/printproperty.c
diff options
context:
space:
mode:
authorSteven G. Johnson <stevenj@mit.edu>2015-03-08 17:23:43 -0400
committerSteven G. Johnson <stevenj@mit.edu>2015-03-12 12:10:19 -0400
commita4c84d2063bb6f2218bc20f89e59001319361f6d (patch)
treebf9799783e0f66c67f0303ea13a778fe51eff539 /test/printproperty.c
parent08f101a9e8c6a72dfdb1c9b913df880e13a36333 (diff)
downloadlibutf8proc-a4c84d2063bb6f2218bc20f89e59001319361f6d.tar.gz
libutf8proc-a4c84d2063bb6f2218bc20f89e59001319361f6d.tar.bz2
fix #2: add charwidth function
Diffstat (limited to 'test/printproperty.c')
-rw-r--r--test/printproperty.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/printproperty.c b/test/printproperty.c
index 37e4fa3..6be8cb1 100644
--- a/test/printproperty.c
+++ b/test/printproperty.c
@@ -11,7 +11,7 @@ int main(int argc, char **argv)
check(sscanf(argv[i],"%x",&c) == 1, "invalid hex input %s", argv[i]);
const utf8proc_property_t *p = utf8proc_get_property(c);
printf("U+%s:\n"
- " category = %d\n"
+ " category = %s\n"
" combining_class = %d\n"
" bidi_class = %d\n"
" decomp_type = %d\n"
@@ -24,9 +24,10 @@ int main(int argc, char **argv)
" comp_exclusion = %d\n"
" ignorable = %d\n"
" control_boundary = %d\n"
- " boundclass = %d\n",
+ " boundclass = %d\n"
+ " charwidth = %d\n",
argv[i],
- p->category,
+ utf8proc_category_string(c),
p->combining_class,
p->bidi_class,
p->decomp_type,
@@ -39,7 +40,8 @@ int main(int argc, char **argv)
p->comp_exclusion,
p->ignorable,
p->control_boundary,
- p->boundclass);
+ p->boundclass,
+ utf8proc_charwidth(c));
}
return 0;
}