Преглед на файлове

Call AT_SORT_PREREQ. Remove fd 2 redirection after sort invocations

Sergey Poznyakoff преди 19 години
родител
ревизия
1524831224
променени са 9 файла, в които са добавени 26 реда и са изтрити 13 реда
  1. 3 2
      tests/extrac04.at
  2. 5 4
      tests/incr03.at
  3. 3 2
      tests/listed02.at
  4. 4 2
      tests/pipe.at
  5. 2 0
      tests/rename01.at
  6. 1 0
      tests/rename02.at
  7. 2 0
      tests/rename03.at
  8. 3 1
      tests/same-order01.at
  9. 3 2
      tests/update.at

+ 3 - 2
tests/extrac04.at

@@ -1,7 +1,7 @@
 # Process this file with autom4te to create testsuite. -*- Autotest -*-
 
 # Test suite for GNU tar.
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006 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
@@ -24,6 +24,7 @@ AT_SETUP([extract + fnmatch])
 AT_KEYWORDS([extract extract04])
 
 AT_TAR_CHECK([
+AT_SORT_PREREQ
 touch file1
 mkdir directory
 mkdir directory/subdirectory
@@ -35,7 +36,7 @@ tar -cf archive ./file1 directory
 tar -tf archive \
   --exclude='./*1' \
   --exclude='d*/*1' \
-  --exclude='d*/s*/*2' | sort 2>/dev/null
+  --exclude='d*/s*/*2' | sort 
 ],
 [0],
 [directory/

+ 5 - 4
tests/incr03.at

@@ -29,6 +29,7 @@ AT_SETUP([renamed files in incrementals])
 AT_KEYWORDS([incremental incr03 rename])
 
 AT_TAR_CHECK([
+AT_SORT_PREREQ
 mkdir directory
 genfile --file=directory/x
 genfile --file=directory/y
@@ -41,17 +42,17 @@ tar -cf archive.2 -g db directory
 mv directory orig
 
 echo Listing of archive.1
-tar -tf archive.1 | sort 2>/dev/null
+tar -tf archive.1 | sort 
 echo Listing of archive.2
-tar -tf archive.2 | sort 2>/dev/null
+tar -tf archive.2 | sort 
 
 echo Directory after first restore
 tar -xf archive.1 -g db
-find directory | sort 2>/dev/null
+find directory | sort
 
 echo Directory after second restore
 tar -xf archive.2 -g db
-find directory | sort 2>/dev/null
+find directory | sort 
 ],
 [0],
 [Listing of archive.1

+ 3 - 2
tests/listed02.at

@@ -29,8 +29,9 @@ AT_SETUP([working --listed])
 AT_KEYWORDS([listed incremental listed02])
 
 AT_TAR_CHECK([
-
+AT_SORT_PREREQ
 echo Create directories
+
 mkdir tart
 sleep 1
 mkdir tart/c0
@@ -50,7 +51,7 @@ tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
 
 # The above prints two lines to stderr announcing the new directories c0 and c1.
 # Ensure that they appear in this script's stderr in sorted order.
-sort err 1>&2 2>/dev/null; rm -f err
+sort err 1>&2; rm -f err
 
 sleep 1
 echo Modifying filesystem

+ 4 - 2
tests/pipe.at

@@ -31,12 +31,14 @@ AT_SETUP([decompressing from stdin])
 AT_KEYWORDS([pipe])
 
 AT_TAR_CHECK([
+AT_SORT_PREREQ
+
 mkdir directory
 genfile --length 10240 --pattern zeros --file directory/file1
 genfile --length 13 --file directory/file2
-tar cf archive directory|sort 2>/dev/null
+tar cf archive directory|sort 
 mv directory orig
-cat archive | tar xfv - | sort 2>/dev/null
+cat archive | tar xfv - | sort 
 echo "separator"
 cmp orig/file1 directory/file1
 echo "separator"

+ 2 - 0
tests/rename01.at

@@ -25,6 +25,8 @@ AT_SETUP([renamed dirs in incrementals])
 AT_KEYWORDS([incremental rename rename01])
 
 AT_TAR_CHECK([
+AT_SORT_PREREQ
+
 mkdir foo
 genfile --file foo/file1
 genfile --file foo/file2

+ 1 - 0
tests/rename02.at

@@ -25,6 +25,7 @@ AT_SETUP([move between hierarchies])
 AT_KEYWORDS([incremental rename rename02])
 
 AT_TAR_CHECK([
+AT_SORT_PREREQ
 mkdir foo
 genfile --file foo/file1
 genfile --file foo/file2

+ 2 - 0
tests/rename03.at

@@ -24,6 +24,8 @@ AT_SETUP([cyclic renames])
 AT_KEYWORDS([incremental rename rename03 cyclic-rename])
 
 AT_TAR_CHECK([
+AT_SORT_PREREQ
+
 mkdir foo
 genfile --file foo/file1
 genfile --file foo/file2

+ 3 - 1
tests/same-order01.at

@@ -27,6 +27,8 @@ AT_SETUP([same-order01])
 AT_KEYWORDS([same-order same-order01])
 
 AT_TAR_CHECK([
+AT_SORT_PREREQ
+
 genfile -l 1024 -f file1
 genfile -l 1024 -f file2
 tar cf archive file1 file2
@@ -34,7 +36,7 @@ tar cf archive file1 file2
 mkdir directory
 tar -xf archive --same-order -C directory || exit 1
 
-ls directory|sort 2>/dev/null
+ls directory|sort 
 ],
 [0],
 [file1

+ 3 - 2
tests/update.at

@@ -1,7 +1,7 @@
 # Process this file with autom4te to create testsuite. -*- Autotest -*-
 
 # Test suite for GNU tar.
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006 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
@@ -28,6 +28,7 @@ AT_SETUP([update unchanged directories])
 AT_KEYWORDS([update])
 
 AT_TAR_CHECK([
+AT_SORT_PREREQ
 mkdir directory
 genfile --length 10240 --pattern zeros --file directory/file1
 genfile --length 10240 --pattern default --file directory/file2
@@ -36,7 +37,7 @@ tar cf archive directory || exit 1
 echo separator
 tar uf archive directory || exit 1
 echo separator
-tar tf archive | sort 2>/dev/null || exit 1
+tar tf archive | sort || exit 1
 ],
 [0],
 [separator