aboutsummaryrefslogtreecommitdiff
path: root/lib/newlib_tests/shell/tst_res_flags.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/newlib_tests/shell/tst_res_flags.sh')
-rwxr-xr-xlib/newlib_tests/shell/tst_res_flags.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/newlib_tests/shell/tst_res_flags.sh b/lib/newlib_tests/shell/tst_res_flags.sh
new file mode 100755
index 000000000..bca3d26c0
--- /dev/null
+++ b/lib/newlib_tests/shell/tst_res_flags.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2023 Petr Vorel <pvorel@suse.cz>
+
+TST_TESTFUNC=test
+TST_CLEANUP=cleanup
+
+test()
+{
+ tst_res TPASS "TPASS message"
+ tst_res TFAIL "TFAIL message"
+ tst_res TBROK "TBROK message"
+ tst_res TCONF "TCONF message"
+ tst_res TWARN "TWARN message"
+ tst_res TINFO "TINFO message"
+}
+
+cleanup()
+{
+ tst_brk TBROK "TBROK message should be TWARN in cleanup"
+}
+
+. tst_test.sh
+tst_run