Import upstream version 1.26
[debian/tar] / tests / sigpipe.at
index 9edca77cf13a971b63421c321592ccaf427e97a2..dff94f6c4dbf61c5dec09f9b974c4927c68d7838 100644 (file)
@@ -26,13 +26,16 @@ AT_KEYWORDS([sigpipe])
 #             <20100319184141.GC30047@wo.int.altlinux.org>
 
 AT_CHECK([
+AT_SIGPIPE_PREREQ
+
 genfile --length 2048 --file first
 genfile --length 2048 --file second
 genfile --length 2049 --file third
 
 tar cf archive first second third
 
-tar tf archive | :
+# Discard diagnostics that some shells generate about broken pipes.
+(tar tf archive 2>&3 | :) 3>&2 2>/dev/null
 ],
 [0])