1#!/bin/sh -e 2# SPDX-License-Identifier: GPL-2.0-or-later 3# Copyright (c) 2022 Petr Vorel <pvorel@suse.cz> 4 5TST_TESTFUNC=test 6TST_CNT=6 7 8# not needed, just cover more code 9TST_SETUP=setup 10TST_CLEANUP=cleanup 11TST_NEEDS_TMPDIR=1 12 13setup() 14{ 15 tst_res TINFO "in setup" 16} 17 18cleanup() 19{ 20 tst_res TINFO "in cleanup" 21} 22 23run() 24{ 25 tst_res TINFO "LTP_COLORIZE_OUTPUT: '$LTP_COLORIZE_OUTPUT'" 26 tst_res TPASS "shell library works with set -e" 27} 28 29test1() 30{ 31 export LTP_COLORIZE_OUTPUT=y 32 run 33} 34 35test2() 36{ 37 export LTP_COLORIZE_OUTPUT=n 38 run 39} 40 41test3() 42{ 43 export LTP_COLORIZE_OUTPUT=0 44 run 45} 46 47test4() 48{ 49 export LTP_COLORIZE_OUTPUT=1 50 run 51} 52 53test5() 54{ 55 export LTP_COLORIZE_OUTPUT= 56 run 57} 58 59test6() 60{ 61 unset LTP_COLORIZE_OUTPUT 62 run 63} 64 65. tst_test.sh 66tst_run 67