summaryrefslogtreecommitdiff
path: root/tests/test-break.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-08-09 21:47:19 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-08-09 22:07:01 -0400
commitb4edec796225a2348812964ae9c186dba6780ae2 (patch)
tree41a9eef1fe49d57b7e3eeb09d50cffeb8a15edc8 /tests/test-break.c
parent97778b40daedac08f67f9e8ca9572c241e26ef42 (diff)
downloadpango-b4edec796225a2348812964ae9c186dba6780ae2.tar.gz
test-break: Add a legend
Use test-break --help to get a legend for the codes used in the output.
Diffstat (limited to 'tests/test-break.c')
-rw-r--r--tests/test-break.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/tests/test-break.c b/tests/test-break.c
index fca5677b..e020b583 100644
--- a/tests/test-break.c
+++ b/tests/test-break.c
@@ -316,11 +316,26 @@ main (int argc, char *argv[])
/* allow to easily generate expected output for new test cases */
if (argc > 1)
{
- GString *string;
+ if (strcmp (argv[1], "--help") == 0)
+ {
+ g_print ("test-break uses the following symbols for log attrs\n\n");
+ g_print ("Breaks: Words:\n"
+ " L - mandatory break b - word boundary\n"
+ " l - line break s - word start\n"
+ " c - char break e - word end\n"
+ "\n"
+ "Whitespace: Sentences:\n"
+ " x - expandable space s - sentence start\n"
+ " w - whitespace e - sentence end\n");
+ }
+ else
+ {
+ GString *string;
- string = g_string_sized_new (0);
- test_file (argv[1], string);
- g_print ("%s", string->str);
+ string = g_string_sized_new (0);
+ test_file (argv[1], string);
+ g_print ("%s", string->str);
+ }
return 0;
}