From nobody Mon Dec 23 19:13:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YH73m6gsMz5hH6c; Mon, 23 Dec 2024 19:13:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YH73m4Z4Fz40dt; Mon, 23 Dec 2024 19:13:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734981236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M9dQqDTAvrktUKu9ehMFneDPChX3Ytv0H8H8zngqz64=; b=rOj8xFokQP5vTA14BTt/GgbysHV5kRxFOiLqpB2Qw0ar+j2BhqCzoC8XwGs58fX2zVWd/w TrwkcuFx6aGL3LArFwgCHAXGJgK2oTN6XA7XsMgJxGc5lIo/59dRyTMbdYYn9KMqXx4sHR JLuZJ3IKSBrDgqLjfjISwwT7UQnrLP0OMSX/Jexf+IS//AqJ8W+ToDSL+UaaJomegLjUUM eBSOzna1H3wS279DfdQF8+LQqnC1qNkwZ+n4xbsI3gvP+SvDcPHzj7upYVX67PHxSnF3vW Hk2/aLX0fk68kjWWlXo+OLlWUxrN2FDl6da81ItoCvdMkOr8sMJ3XWQxblwlDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734981236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M9dQqDTAvrktUKu9ehMFneDPChX3Ytv0H8H8zngqz64=; b=wmxiav62toipRGX0ZDiNnsY4/Vch9v/FoerggydTp7637boINfETmQFJakzNdbA8G6imUJ PcUp9uZu5yyOIdvgnNAQUDGMtmcQmpKDnZMlLgQeJ06zL20ntnzSDzfvZhYE/mAVn3JK0x vue189d7+WBlfSP/0B6JXPN+vek3ITEx9czHxDFadPzUi90/0E3oOHlJn3VMD+QI/T2akL z6lMefnbAXH4E6Ps9LfWyRqwRIp/A9JhbXcPNYNS3ZbXR6RIzg2osvdrBuKUJQ327ycnfH 4d8UP8Ug9mnRqFbzgF1N93S8uhpJ8gIU2EUzOsR3olSNff8F6n1sceD1SEo80g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734981236; a=rsa-sha256; cv=none; b=Ym8ZqIQ4egKeX2p2Xadw86cBq5+1jlHvwAScUiRlbvAAcTBNvYXs+n3WIsblDuoB+eklqE 0vcaMCN5h8m/Z1aHZsPjgbeMQ8DfKN7pKB7fOjLgcMmQPavXBxjT7R4r0naPeXAfwmY1fm bOwubMvfq0uvXfT3exYUETB4PA4RbIT1yTQQwH1n/I0hxxeaS9LGPSYDOfK+g9r92Nv3eV foO0H3xTwVI2BZpyphvngYZewbsVNtD8cVjTypp5F8EVWM1WfsqlxfVrHNwXtWq0mRP0So C7pn9v+C0p8WouhX0UDZGWebYyB+kwv73yzZEWhvHe0sSwjTqwvpPYDciXdJ9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YH73m36D2z15ky; Mon, 23 Dec 2024 19:13:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BNJDutE003762; Mon, 23 Dec 2024 19:13:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BNJDus9003759; Mon, 23 Dec 2024 19:13:56 GMT (envelope-from git) Date: Mon, 23 Dec 2024 19:13:56 GMT Message-Id: <202412231913.4BNJDus9003759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 003818aca4cd - main - sed tests: Add a regression test for the c function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 003818aca4cdda47adef808a56d48003aa514029 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=003818aca4cdda47adef808a56d48003aa514029 commit 003818aca4cdda47adef808a56d48003aa514029 Author: Mark Johnston AuthorDate: 2024-12-23 19:06:11 +0000 Commit: Mark Johnston CommitDate: 2024-12-23 19:08:15 +0000 sed tests: Add a regression test for the c function Based on the test case from PR 271817 by Mohamed Akram. PR: 271817 MFC after: 2 weeks --- usr.bin/sed/tests/sed2_test.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/usr.bin/sed/tests/sed2_test.sh b/usr.bin/sed/tests/sed2_test.sh index 0b849b1ea132..c88e998425a0 100755 --- a/usr.bin/sed/tests/sed2_test.sh +++ b/usr.bin/sed/tests/sed2_test.sh @@ -159,6 +159,28 @@ minus_e_body() atf_check -o 'inline:--\nab\n' sed $'1 i\\\n--' a } +atf_test_case command_c +command_c_head() +{ + atf_set "descr" "Verify that the 'c' command starts a new cycle" +} +command_c_body() +{ + printf "%s\n" a b c d e f > a + printf "%s\n" x c d e f > expected + + atf_check -o file:expected sed ' +/a/,/b/c\ +x +' a + + atf_check -o file:expected sed ' +/a/,/b/c\ +x +$!N +' a +} + atf_test_case command_D command_D_head() { @@ -182,5 +204,6 @@ atf_init_test_cases() atf_add_test_case hex_subst atf_add_test_case bracket_y atf_add_test_case minus_e + atf_add_test_case command_c atf_add_test_case command_D }