From 5f6a314749fe0916a3ffce4efac1e505c316b56c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 20 Oct 2006 11:22:32 +0200 Subject: [PATCH] added testscript --- test/return-value.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 test/return-value.sh diff --git a/test/return-value.sh b/test/return-value.sh new file mode 100755 index 0000000..e91de9a --- /dev/null +++ b/test/return-value.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +ls /surely-not-existent$$ 2>/dev/null + +if [ "$?" -ne 0 ]; then + echo "$?" +fi + +ls /surely-not-existent$$ 2>/dev/null + +ret=$? + +if [ "$ret" -ne 0 ]; then + echo "$ret" +fi +