From e04d6b7bf58a95105a8fc79fcde7c0e98875e72a Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Tue, 13 Sep 2022 18:42:15 +0000 Subject: tests: directly test for presence of command Test directly for presence of command instead of indirectly testing the return code. Additionally: * uses a shell builtin `command -v` instead of external `which` * `command -v` is the standardized version of `which` --- test/apps/apps.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/apps') diff --git a/test/apps/apps.sh b/test/apps/apps.sh index 83e977ba0..ed4b7604a 100755 --- a/test/apps/apps.sh +++ b/test/apps/apps.sh @@ -11,8 +11,7 @@ LIST="firefox midori chromium opera transmission-qt qbittorrent uget-gtk filezil LIST+="vlc fbreader deluge gnome-mplayer xchat wine kcalc ktorrent hexchat" for app in $LIST; do - which $app 2>/dev/null - if [ "$?" -eq 0 ]; + if command -v "$app" then echo "TESTING: $app" ./$app.exp -- cgit v1.2.3-54-g00ecf