Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2019 16:18:17 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r343528 - stable/12/usr.bin/cmp/tests
Message-ID:  <201901281618.x0SGIHZd079113@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901281618.x0SGIHZd079113>