From owner-svn-src-head@freebsd.org Tue Jun 6 21:50:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED1B0BF57DA; Tue, 6 Jun 2017 21:50:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C673C7C436; Tue, 6 Jun 2017 21:50:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v56Lo03d020727; Tue, 6 Jun 2017 21:50:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v56Lo0vS020722; Tue, 6 Jun 2017 21:50:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706062150.v56Lo0vS020722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 6 Jun 2017 21:50:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319637 - in head: bin/cat/tests contrib/netbsd-tests/bin/cat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 21:50:02 -0000 Author: ngie Date: Tue Jun 6 21:50:00 2017 New Revision: 319637 URL: https://svnweb.freebsd.org/changeset/base/319637 Log: Add testcases for `cat -b` MFC after: 1 month Sponsored by: Dell EMC Isilon Added: head/contrib/netbsd-tests/bin/cat/d_b_output.in (contents, props changed) head/contrib/netbsd-tests/bin/cat/d_b_output.out Modified: head/bin/cat/tests/Makefile head/contrib/netbsd-tests/bin/cat/t_cat.sh Modified: head/bin/cat/tests/Makefile ============================================================================== --- head/bin/cat/tests/Makefile Tue Jun 6 21:40:35 2017 (r319636) +++ head/bin/cat/tests/Makefile Tue Jun 6 21:50:00 2017 (r319637) @@ -6,6 +6,8 @@ NETBSD_ATF_TESTS_SH= cat_test ${PACKAGE}FILES+= d_align.in ${PACKAGE}FILES+= d_align.out +${PACKAGE}FILES+= d_b_output.in +${PACKAGE}FILES+= d_b_output.out ${PACKAGE}FILES+= d_se_output.in ${PACKAGE}FILES+= d_se_output.out ${PACKAGE}FILES+= d_s_output.in Added: head/contrib/netbsd-tests/bin/cat/d_b_output.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/netbsd-tests/bin/cat/d_b_output.in Tue Jun 6 21:50:00 2017 (r319637) @@ -0,0 +1,4 @@ +This is a line + +The line before this was a blank line. + This line has leading whitespace. Added: head/contrib/netbsd-tests/bin/cat/d_b_output.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/netbsd-tests/bin/cat/d_b_output.out Tue Jun 6 21:50:00 2017 (r319637) @@ -0,0 +1,4 @@ + 1 This is a line + + 2 The line before this was a blank line. + 3 This line has leading whitespace. Modified: head/contrib/netbsd-tests/bin/cat/t_cat.sh ============================================================================== --- head/contrib/netbsd-tests/bin/cat/t_cat.sh Tue Jun 6 21:40:35 2017 (r319636) +++ head/contrib/netbsd-tests/bin/cat/t_cat.sh Tue Jun 6 21:50:00 2017 (r319637) @@ -52,6 +52,19 @@ nonexistent_body() { -x "cat /some/name/that/does/not/exist" } +# Begin FreeBSD +atf_test_case b_output +b_output_head() { + atf_set "descr" "Test that cat(1) prints out numbers on non-blank "\ + "lines with '-b'" +} + +b_output_body() { + atf_check -o file:$(atf_get_srcdir)/d_b_output.out \ + cat -b $(atf_get_srcdir)/d_b_output.in +} +# End FreeBSD + atf_test_case se_output se_output_head() { atf_set "descr" "Test that cat(1) prints a $ sign " \ @@ -103,6 +116,9 @@ atf_init_test_cases() { atf_add_test_case align atf_add_test_case nonexistent +# Begin FreeBSD + atf_add_test_case b_output +# End FreeBSD atf_add_test_case se_output # Begin FreeBSD atf_add_test_case s_output