From owner-svn-src-head@freebsd.org Wed Jun 10 21:44:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20B003404F1; Wed, 10 Jun 2020 21:44:43 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 49j0rV5YT7z4cCN; Wed, 10 Jun 2020 21:44:42 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id C8ECB5C0067; Wed, 10 Jun 2020 17:44:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 10 Jun 2020 17:44:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.dev; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=s sgp7VRWmxt0LedH+0WDiT3JTN2knEVhe77+y+IvMt8=; b=gOTYIJiqs8a2dYWXY 3LxFW114ldSgJVFG8/EzQ+xj0SvW8RCdXDYZMAwAp0hklPcV6KpO42+PwUU0qzDH n3EjT+eEObud+I6/dNrioXvWPeI94f6EFjksdBf0eWPPdxQrQgY862W55kzpmy8q wqd7kYEndylJ1SjHcRo9peooZA8Rfv8EtifJiP9ReZ+rMZ/QeSSWVNoH7rAkJ5Mt 3LXw0fHHMGKXfOTM+OC6rqb8+DAHB42aO/vXUHbJgIkNEP2RxurWtg4Hdl61+RPR 6RZuaUMC+D3qvzIYe68kb6DQvKVf24rKF/O6XGLK1dN9JR8kSE55alWBYCwf3BRR 7y91Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=ssgp7VRWmxt0LedH+0WDiT3JTN2knEVhe77+y+IvM t8=; b=Qt5dWOMHSGJccSvitjbs++GHslDWJSHg4BBWEsmWBkcEvURLRRxuNiYpx Y/KeSPhx7P0W3JyBzI+Esv/51/Ax+GOjznnlMXncW2daEPqysjuPpQG0vYSvugJd 0XGVK5IexTOgYTShF1ZHg3VvOzovUIcj+x0GkrNs3bNM8x6MvC9SD/qd42HGqn5n whk3JjxdUNaV5sbEPr51+IfpUUNPUzcDSGTcgpE8b4PwSSvtdwRFAYOcGFCBpJ5Z P/oGH4rVvvSHopKH5HDHT/cp2Ez2HPyNOTfoLw1OK6QBCDk3vvayYSNqdc+kIA8c v6+Po7myurQ8AGIkyNrEX/HL7J88A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudehjedgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpegjuhhrihcurfgrnhhkohhvuceohihurhhiphhvseihuhhr ihhpvhdruggvvheqnecuggftrfgrthhtvghrnhepieekteeftdeftdekhfffueeljeefff fgffffuefhhefgheejvdegfeehieevudfgnecuffhomhgrihhnpehfrhgvvggsshgurdho rhhgnecukfhppeeluddrvdegtddruddvgedrudefkeenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeihuhhrihhpvheshihurhhiphhvrdguvghv X-ME-Proxy: Received: from mercury.yuripv.dev (unknown [91.240.124.138]) by mail.messagingengine.com (Postfix) with ESMTPA id AB0783280064; Wed, 10 Jun 2020 17:44:40 -0400 (EDT) Subject: Re: svn commit: r362017 - in head/usr.bin/sed: . tests To: Mateusz Piotrowski <0mp@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006101923.05AJNwPt006602@repo.freebsd.org> From: Yuri Pankov Message-ID: Date: Thu, 11 Jun 2020 00:44:38 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <202006101923.05AJNwPt006602@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49j0rV5YT7z4cCN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 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: Wed, 10 Jun 2020 21:44:43 -0000 Mateusz Piotrowski wrote: > Author: 0mp (doc,ports committer) > Date: Wed Jun 10 19:23:58 2020 > New Revision: 362017 > URL: https://svnweb.freebsd.org/changeset/base/362017 > > Log: > Read commands from stdin when -f - is passed to sed(1) > > This patch teaches sed to interpret a "-" in a special way when given > as an argument to the -f flag. > > This behavior is also present in GNU sed. > > PR: 244872 > Tested by: antoine (exp-run) > Reviewed by: pfg, tobik (older version) > Approved by: pfg (src) > Relnotes: yes > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D24079 > > Modified: > head/usr.bin/sed/main.c > head/usr.bin/sed/sed.1 > head/usr.bin/sed/tests/sed2_test.sh [...] > Modified: head/usr.bin/sed/tests/sed2_test.sh > ============================================================================== > --- head/usr.bin/sed/tests/sed2_test.sh Wed Jun 10 18:59:46 2020 (r362016) > +++ head/usr.bin/sed/tests/sed2_test.sh Wed Jun 10 19:23:58 2020 (r362017) > @@ -116,11 +116,68 @@ hex_subst_body() > atf_check -o "inline:" sed 's/\xx//' d > } > > +atf_test_case commands_on_stdin > +commands_on_stdin_head() > +{ > + atf_set "descr" "Verify -f -" > +} > +commands_on_stdin_body() > +{ > + printf "a\n" > a > + printf "s/a/b/\n" > a_to_b > + printf "s/b/c/\n" > b_to_c > + printf "s/c/d/\n" > ./- > + atf_check -o 'inline:d\n' sed -f a_to_b -f - -f ./- a < b_to_c > + > + # Verify that nothing is printed if there are no input files provided. > + printf 'i\\\nx' > insert_x > + atf_check -o 'empty' sed -f - < insert_x > +} > + > +atf_test_case commands_on_stdin > +commands_on_stdin_head() > +{ > + atf_set "descr" "Verify -f -" > +} > +commands_on_stdin_body() > +{ > + printf "a\n" > a > + printf "s/a/b/\n" > a_to_b > + printf "s/b/c/\n" > b_to_c > + printf "s/c/d/\n" > ./- > + atf_check -o 'inline:d\n' sed -f a_to_b -f - -f ./- a < b_to_c > + > + # Verify that nothing is printed if there are no input files provided. > + printf 'i\\\nx' > insert_x > + atf_check -o 'empty' sed -f - < insert_x > +} > + > +atf_test_case commands_on_stdin > +commands_on_stdin_head() > +{ > + atf_set "descr" "Verify -f -" > +} > +commands_on_stdin_body() > +{ > + printf "a\n" > a > + printf "s/a/b/\n" > a_to_b > + printf "s/b/c/\n" > b_to_c > + printf "s/c/d/\n" > ./- > + atf_check -o 'inline:d\n' sed -f a_to_b -f - -f ./- a < b_to_c > + > + # Verify that nothing is printed if there are no input files provided. > + printf 'i\\\nx' > insert_x > + atf_check -o 'empty' sed -f - < insert_x > +} > + > atf_init_test_cases() > { > atf_add_test_case inplace_command_q > atf_add_test_case inplace_hardlink_src > atf_add_test_case inplace_symlink_src > atf_add_test_case escape_subst > + atf_add_test_case commands_on_stdin > + atf_add_test_case commands_on_stdin > + atf_add_test_case commands_on_stdin > atf_add_test_case hex_subst > } > Am I reading it wrong, or is it the same test case added 3 times?