svn commit: r343528 - stable/12/usr.bin/cmp/tests

Mark Johnston markj at FreeBSD.org
Mon Jan 28 16:18:18 UTC 2019


Author: markj
Date: Mon Jan 28 16:18:17 2019
New Revision: 343528
URL: https://svnweb.freebsd.org/changeset/base/343528

Log:
  MFC r343247:
  Fix cmp(1) tests for "special" mode.

Modified:
  stable/12/usr.bin/cmp/tests/cmp_test2.sh
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/cmp/tests/cmp_test2.sh
==============================================================================
--- stable/12/usr.bin/cmp/tests/cmp_test2.sh	Mon Jan 28 16:14:53 2019	(r343527)
+++ stable/12/usr.bin/cmp/tests/cmp_test2.sh	Mon Jan 28 16:18:17 2019	(r343528)
@@ -31,11 +31,10 @@ special_head() {
 special_body() {
 	echo 0123456789abcdef > a
 	echo 0123456789abcdeg > b
-	cat a | atf_check -s exit:0 cmp a -
-	cat a | atf_check -s exit:0 cmp - a
-	cat b | atf_check -s not-exit:0 cmp a -
-	cat b | atf_check -s not-exit:0 cmp - a
-	true
+	atf_check -s exit:0 -o empty -e empty -x "cat a | cmp a -"
+	atf_check -s exit:0 -o empty -e empty -x "cat a | cmp - a"
+	atf_check -s exit:1 -o not-empty -e empty -x "cat b | cmp a -"
+	atf_check -s exit:1 -o not-empty -e empty -x "cat b | cmp - a"
 }
 
 atf_test_case symlink


More information about the svn-src-all mailing list