tests: factor 350 fail=0 initializations into test-lib.sh
[platform/upstream/coreutils.git] / tests / mv / backup-dir
index e3b42fb..6461644 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Ensure "mv --verbose --backup" works the same for dirs and non-dirs.
 
-# Copyright (C) 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 2006-2009 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,12 +21,11 @@ if test "$VERBOSE" = yes; then
   mv --version
 fi
 
-. $top_srcdir/tests/test-lib.sh
+. $srcdir/test-lib.sh
 
 mkdir A B || framework_failure
 touch X Y || framework_failure
 
-fail=0
 
 # Before coreutils-6.2, the " (backup: `B.~1~')" suffix was not printed.
 mv --verbose --backup=numbered -T A B > out || fail=1
@@ -36,4 +35,4 @@ EOF
 
 compare out exp || fail=1
 
-(exit $fail); exit $fail
+Exit $fail