From b4edec796225a2348812964ae9c186dba6780ae2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 9 Aug 2020 21:47:19 -0400 Subject: test-break: Add a legend Use test-break --help to get a legend for the codes used in the output. --- tests/test-break.c | 23 +++++++++++++++++++---- 1 file 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; } -- cgit v1.2.1