Date: Fri, 17 Jan 2025 19:17:33 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 6d34cce60684 - stable/14 - sed tests: Add a regression test for the c function Message-ID: <202501171917.50HJHX4X011415@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6d34cce6068401e5736c05b3c130c0583af1f2e9 commit 6d34cce6068401e5736c05b3c130c0583af1f2e9 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-12-23 19:06:11 +0000 Commit: Mark Johnston <markj@FreeBSD.org> 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 }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501171917.50HJHX4X011415>