From nobody Fri Jan 17 19:17:33 2025 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 4YZTyP4f8yz5lLV1; Fri, 17 Jan 2025 19:17:33 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YZTyP41NKz3rFW; Fri, 17 Jan 2025 19:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737141453; 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=0FW4P7YCpZiYUSEiDsqHJKjoUnbmCprgmdX97tqNXIk=; b=Jt02K3ONRBw22vsvE0tlz418Q/FfTQe8BwKHZ3nkq2Ed7x3HrtmpBxBwzNNKe1Iz2Fm9p+ yyxeUvXPkzu7Kx4V+VoXdsARQebXa427DCkNts+YNhDmQsh76UzSaDXLz8bf5cUO1wNbGv Fa7lntd0Pzyus2Cfi2PYDlGxhU7+HsWa+fDuZo/sV9vb+hV9lwbMTxXSgUQa/SxiWEXvMI VNq/lKL+IQRhdlXPK+HvKA/+G1D8aD1A6CZQnfUMYInVSk1oaGv7koHV4L8nuOHJWA9aXs Gd7O7XWB+7UNLAn5XtpsBrcGBolNDXGN+XcPx8hLnOASmuGIjUFuoLr0B+CHYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737141453; 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=0FW4P7YCpZiYUSEiDsqHJKjoUnbmCprgmdX97tqNXIk=; b=VvXtL1s/8LMNS/X4OKKGcvA9+um18D+KieYCLiOYDtWUw6sdS/B4kuXbu0FdNscV5Za/TR svjbZqoCHhmr31zcpVd1rzwgaCyPkNL0nrrhzSacr733JLBE6OtC7H5HcbQ5JXlOroEn20 0g6KPMCeoL3Ukn2VbT6eilBCEx+Ds7CrRXi2cSR2YVmFyfGyXxUazLYSYhx/+/iFAfG4HC zuuxJCqztOqgKxKToMicEAD7svXCz4tVf0ABAEX+RUrqGxCb+c0auREoZUFZRcC4as2WvA Zg+TNm/c+ocBpMSWr/24nhLWtZe4DSukQ9FOC9L5JvkdyCTxkecqO7l9DE1Asw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737141453; a=rsa-sha256; cv=none; b=wnUTV5c1CcJ4K8plDkTbKwsljpH3bq+4q7/mjwFb+hGXaFFQKBLFXJCaYeGkEZ/kx2vz82 vSBaPnD+IIpXUVOdbKPn7+bC++gyG4n4P48XAgzWcoSLSCZbTm+P4jVB/HOEZTmSrEij63 WwUoGAB8nyh5dN0kwDz425gSuPFPjNq9tJnAcwR+i3NdjHmmK3HH2u9Tq0+ycpz9AlOanW 3aYDYg2YsSr1J/ajSfcf4UoW4LGBpLUXZG+syT4/wYPuJM7xxJinChTquwudn3emQDtSRS y5jairjjlI58+pmV1hAarMbd9E7B0D3l+5H3C9TFcCJBIge2B8/kfCDy+OybQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YZTyP3ctbzXFk; Fri, 17 Jan 2025 19:17:33 +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 50HJHX5g011418; Fri, 17 Jan 2025 19:17:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50HJHX4X011415; Fri, 17 Jan 2025 19:17:33 GMT (envelope-from git) Date: Fri, 17 Jan 2025 19:17:33 GMT Message-Id: <202501171917.50HJHX4X011415@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6d34cce60684 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 6d34cce6068401e5736c05b3c130c0583af1f2e9 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6d34cce6068401e5736c05b3c130c0583af1f2e9 commit 6d34cce6068401e5736c05b3c130c0583af1f2e9 Author: Mark Johnston AuthorDate: 2024-12-23 19:06:11 +0000 Commit: Mark Johnston CommitDate: 2025-01-17 18:48: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 (cherry picked from commit 003818aca4cdda47adef808a56d48003aa514029) --- 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 }