From nobody Fri Jan 17 19:17:41 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 4YZTyZ1p0rz5lLr5; Fri, 17 Jan 2025 19:17:42 +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 4YZTyY5zWJz3rY1; Fri, 17 Jan 2025 19:17:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737141461; 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=gB6SQhWdJ+O8M3fn0M6qaljdbACZIOtXj5EFATuDTuU=; b=SpGhLSvlCdiwivHSpLbzatTAZXGOZOXUopWlA+siXAzeHxNXM97471DrMc2PboP8pKGdai 6SVXYN6QhBtgMppA8Dl/uWUNkBAGlpw3iiLMZsAxg0iLDdebxIpaG7dB0r/4dWl60AaENV 9Ot/qf9B27KtAf/AulYGqA2wZLZUKGxtf7MAgD1MTJgCKp5ncOdiV5KgDRt1wLaxGGmu6n CYgaGgbVGNT6IVbK6Rf025mSvMWdSOzQfvWJjSWGbQNltnryOtHYVB1TKQbIdDnREhhcRY 2ZdIBm+WHqKSrb9KzREUKncu9IHtFnpN2yfJ926DmswXKIqv9XgTGPXFoxzCXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737141461; 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=gB6SQhWdJ+O8M3fn0M6qaljdbACZIOtXj5EFATuDTuU=; b=Cze+82z/W0y24jCU54oNEL4CnRDLHdP1KbfllFC6ihlMzBIpB7ZMwMLiAOYpqMGNeAeA0n 5e1ga1mhHyMPy8MdX3Ybn61I2uGtlKr4yAf5Oyl8QtrVvz7iOaLfbU9tb8YYp9FJwzJguc tOQKzKeHxLTPgbNZj/jPcJGlCvIM2RCCi3c7KwZ+l0W0hKfu8a8d7UUvbj3LE8Arbd4eOA fOqHp5YL8xPuyEw/d8YYuqyYHiEMRB5lC3PIdQYQLmeWb7/7OGu2cmjxozGxzhRXxz55JJ 4Tf1b/wf7XJRxz4mnNJ56gGWXNoM3hHjj/ICUSumOYzmu4FQlm3QyB6TLzWRhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737141461; a=rsa-sha256; cv=none; b=dn/LQWTtjs31TgoHrAwLnEEz+NtmUx+eWiXAk6gaCUNmUMWgyS3pTdxkj3msLylFXsIZ8+ taQXKpUd0K3Q8vsRdTLzPr5B/2IkXtz32BT41F94T6+/+KRWwvVr/o+BooDxf+OalUHoKH Ym94CF0Hk1xveCEg58n0Ff60kr1h9uMC1PjEwcTqA28ZP2uLlxa1llWOTjaejsoBRUY2re O+cF7zq/Qcx4B0PzMNdjzG6uZKeYlvbKqAuY8r+WVqtNBH1zLvF1eB9WKTDm4njJ5fcEbn bCF+XX7/eLBnSDYmlTJ3j5q4H1xbqdRv7CBOxOpO59R9bYVwOc864eOkMj2DOQ== 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 4YZTyY5SMWzWWd; Fri, 17 Jan 2025 19:17:41 +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 50HJHfs4011651; Fri, 17 Jan 2025 19:17:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50HJHff4011648; Fri, 17 Jan 2025 19:17:41 GMT (envelope-from git) Date: Fri, 17 Jan 2025 19:17:41 GMT Message-Id: <202501171917.50HJHff4011648@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: 9c348f73a856 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 9c348f73a8568769b1a746efd9ccbca2f4ef7252 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9c348f73a8568769b1a746efd9ccbca2f4ef7252 commit 9c348f73a8568769b1a746efd9ccbca2f4ef7252 Author: Mark Johnston AuthorDate: 2024-12-23 19:06:11 +0000 Commit: Mark Johnston CommitDate: 2025-01-17 18:48:19 +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 }