tests: tweak basic-1 to use warn_ rather than literal "exit 77"
authorJim Meyering <meyering@redhat.com>
Mon, 13 Dec 2010 07:19:12 +0000 (08:19 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 13 Dec 2010 07:29:42 +0000 (08:29 +0100)
* tests/install/basic-1 (just_built_dd): Use warn_, rather than
cat and exit 77.

tests/install/basic-1

index 5e07bab..3c45c2a 100755 (executable)
@@ -39,28 +39,16 @@ dd2=dd2$EXEEXT
 
 just_built_dd=$abs_top_builddir/src/$dd
 
-test -r "$just_built_dd" || \
-  {
-    cat 1>&2 <<EOF
-$0: WARNING!!!
-Your just-built dd binary, $just_built_dd
-is not readable, so skipping the remaining tests in this file.
-EOF
-    exit 77
-  }
+test -r "$just_built_dd" \
+  || warn_ "WARNING!!! Your just-built dd binary, $just_built_dd
+is not readable, so skipping the remaining tests in this file."
 
 cp "$just_built_dd" . || fail=1
 cp $dd $dd2 || fail=1
 
-strip $dd2 || \
-  {
-    cat 1>&2 <<EOF
-$0: WARNING!!!
-Your strip command doesn't seem to work, so skipping
-the test of install's --strip option.
-EOF
-    exit 77
-  }
+strip $dd2 \
+  || warn_ "WARNING!!! Your strip command doesn't seem to work,
+so skipping the test of install's --strip option."
 
 # This test would fail with 3.16s when using versions of strip that
 # don't work on read-only files (the one from binutils works fine).