test: Add newlines to hush-test messages
authorSimon Glass <sjg@chromium.org>
Mon, 20 Jan 2025 21:25:28 +0000 (14:25 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 24 Jan 2025 20:34:40 +0000 (14:34 -0600)
A few messages lack a newline so the test output shows the next
test-name on the same line. For example:

   Beware: this test sets local variable dollar_bar and dollar_quux
      and they cannot be unset!Test: hush_test_env_dollar: dollar.c

This is confusing, so fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
test/hush/dollar.c
test/hush/loop.c

index 077dcd6..8201107 100644 (file)
@@ -108,7 +108,7 @@ static int hush_test_simple_dollar(struct unit_test_state *uts)
                /* Reset local variable. */
                ut_assertok(run_command("dollar_foo=", 0));
        } else if (gd->flags & GD_FLG_HUSH_OLD_PARSER) {
-               puts("Beware: this test set local variable dollar_foo and it cannot be unset!");
+               puts("Beware: this test set local variable dollar_foo and it cannot be unset!\n");
        }
 
        return 0;
@@ -140,7 +140,7 @@ static int hush_test_env_dollar(struct unit_test_state *uts)
                /* Reset local variable. */
                ut_assertok(run_command("env_foo=", 0));
        } else if (gd->flags & GD_FLG_HUSH_OLD_PARSER) {
-               puts("Beware: this test set local variable env_foo and it cannot be unset!");
+               puts("Beware: this test set local variable env_foo and it cannot be unset!\n");
        }
 
        return 0;
@@ -206,7 +206,8 @@ static int hush_test_command_dollar(struct unit_test_state *uts)
                ut_assertok(run_command("dollar_bar=", 0));
                ut_assertok(run_command("dollar_quux=", 0));
        } else if (gd->flags & GD_FLG_HUSH_OLD_PARSER) {
-               puts("Beware: this test sets local variable dollar_bar and dollar_quux and they cannot be unset!");
+               puts("Beware: this test sets local variable dollar_bar and "
+                    "dollar_quux and they cannot be unset!\n");
        }
 
        return 0;
index a9b6a8e..7154b9b 100644 (file)
@@ -25,7 +25,7 @@ static int hush_test_for(struct unit_test_state *uts)
                /* Reset local variable. */
                ut_assertok(run_command("loop_i=", 0));
        } else if (gd->flags & GD_FLG_HUSH_OLD_PARSER) {
-               puts("Beware: this test set local variable loop_i and it cannot be unset!");
+               puts("Beware: this test set local variable loop_i and it cannot be unset!\n");
        }
 
        return 0;
@@ -56,7 +56,7 @@ static int hush_test_while(struct unit_test_state *uts)
                /* Reset local variable. */
                ut_assertok(run_command("loop_foo=", 0));
        } else if (gd->flags & GD_FLG_HUSH_OLD_PARSER) {
-               puts("Beware: this test set local variable loop_foo and it cannot be unset!");
+               puts("Beware: this test set local variable loop_foo and it cannot be unset!\n");
        }
 
        return 0;