summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-03-28 14:14:04 +0100
committerJim Meyering <meyering@redhat.com>2008-03-28 14:21:28 +0100
commit17720c10cd73b71230f309137c437bf3aad7b6f5 (patch)
treef5df1dac6af0eedd44cc94f3c065f67d4147aa17 /tests/misc
parent818dbee8dc1a50f6dbc1ba85f7f25a47ded09930 (diff)
downloadcoreutils-17720c10cd73b71230f309137c437bf3aad7b6f5.tar.xz
Require that "(exit $fail); exit $fail" be last line of each test.
* maint.mk (sc_require_test_exit_idiom): New rule to enforce policy. * tests/cp/acl: Adhere to the new policy. * tests/cp/preserve-gid: Likewise. * tests/dd/misc: * tests/install/create-leading: * tests/ln/sf-1: * tests/ls/symlink-slash: * tests/misc/help-version: * tests/misc/ls-time: * tests/misc/nice: * tests/misc/shred-remove: * tests/misc/stty: * tests/misc/stty-row-col: * tests/mkdir/p-1: * tests/mkdir/p-2: * tests/mkdir/p-3: * tests/mkdir/p-v: * tests/mkdir/special-1: * tests/mkdir/writable-under-readonly: * tests/mv/acl: * tests/mv/backup-is-src: * tests/mv/diag: * tests/mv/dir-file: * tests/mv/force: * tests/mv/hard-link-1: * tests/mv/i-2: * tests/mv/i-4: * tests/mv/into-self: * tests/mv/into-self-2: * tests/mv/into-self-3: * tests/mv/partition-perm: * tests/mv/to-symlink: * tests/rmdir/ignore: * tests/tail-2/assert: * tests/tail-2/assert-2: * tests/touch/dangling-symlink: * tests/touch/dir-1: * tests/touch/empty-file: * tests/touch/fifo: * tests/touch/no-rights: Likewise. Signed-off-by: Jim Meyering <meyering@redhat.com>
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/help-version4
-rwxr-xr-xtests/misc/ls-time5
-rwxr-xr-xtests/misc/nice4
-rwxr-xr-xtests/misc/shred-remove4
-rwxr-xr-xtests/misc/stty4
-rwxr-xr-xtests/misc/stty-row-col4
6 files changed, 12 insertions, 13 deletions
diff --git a/tests/misc/help-version b/tests/misc/help-version
index b54a7d8f4..3696736a9 100755
--- a/tests/misc/help-version
+++ b/tests/misc/help-version
@@ -2,7 +2,7 @@
# Make sure all these programs work properly
# when invoked with --help or --version.
-# Copyright (C) 2000-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000-2008 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
@@ -197,4 +197,4 @@ for i in $built_programs; do
rm -rf $tmp_in $tmp_in2 $tmp_out $tmp_dir
done
-exit $fail
+(exit $fail); exit $fail
diff --git a/tests/misc/ls-time b/tests/misc/ls-time
index 7aee5809f..b3f0ca2e5 100755
--- a/tests/misc/ls-time
+++ b/tests/misc/ls-time
@@ -1,8 +1,7 @@
#!/bin/sh
# Test some of ls's sorting options.
-# Copyright (C) 1998, 1999, 2000, 2001, 2004, 2007 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998-2001, 2004, 2007-2008 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
@@ -124,4 +123,4 @@ EOF
fail=1
fi
-exit $fail
+(exit $fail); exit $fail
diff --git a/tests/misc/nice b/tests/misc/nice
index 2e9d3c14c..00227293a 100755
--- a/tests/misc/nice
+++ b/tests/misc/nice
@@ -1,7 +1,7 @@
#! /bin/sh
# Test "nice".
-# Copyright (C) 2002, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005-2008 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
@@ -80,4 +80,4 @@ while :; do
shift; shift; shift
done
-exit $fail
+(exit $fail); exit $fail
diff --git a/tests/misc/shred-remove b/tests/misc/shred-remove
index f09c6f3e8..38013d3d8 100755
--- a/tests/misc/shred-remove
+++ b/tests/misc/shred-remove
@@ -1,7 +1,7 @@
#!/bin/sh
# Exercise a bug that was fixed in shred-4.0l
-# Copyright (C) 1999, 2000, 2003, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999-2000, 2003, 2006-2008 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
@@ -38,4 +38,4 @@ fail=0
# When the command completes, expect it to fail.
shred -u $file > /dev/null 2>&1 && fail=1 || :
-exit $fail
+(exit $fail); exit $fail
diff --git a/tests/misc/stty b/tests/misc/stty
index c9fd67d14..6ec67be01 100755
--- a/tests/misc/stty
+++ b/tests/misc/stty
@@ -1,7 +1,7 @@
#! /bin/sh
# Make sure stty can parse most of its options.
-# Copyright (C) 1998-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2004, 2006-2008 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
@@ -100,4 +100,4 @@ fi
stty `cat $saved_state`
-exit $fail
+(exit $fail); exit $fail
diff --git a/tests/misc/stty-row-col b/tests/misc/stty-row-col
index eb84499ed..c7e49675d 100755
--- a/tests/misc/stty-row-col
+++ b/tests/misc/stty-row-col
@@ -1,7 +1,7 @@
#! /bin/sh
# Test "stty" with rows and columns.
-# Copyright (C) 1998-2001, 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2001, 2003-2008 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
@@ -82,4 +82,4 @@ done
set x $saved_size
stty rows $2 columns $3 || exit 1
-exit $fail
+(exit $fail); exit $fail