logo

system-testsuite

Unix system testsuite (highlights broken bits in GNU and BusyBox)
commit: 364d16d06c95afe9ae22640173362b2a95ea6497
parent dff0b436db92aee4a27343c018736b6bb0b326f7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat,  4 Sep 2021 07:25:05 +0200

sed: New

Diffstat:

MKyuafile1+
Mfalse1-
Ased22++++++++++++++++++++++
Mtrue1-
4 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/Kyuafile b/Kyuafile @@ -7,3 +7,4 @@ test_suite("system-testsuite") -- /BEGIN/,$ | LC_ALL=C.UTF-8 sort atf_test_program{name="true"} atf_test_program{name="false"} +atf_test_program{name="sed"} diff --git a/false b/false @@ -18,7 +18,6 @@ devfull_body() { } atf_init_test_cases() { - cd "$(atf_get_srcdir)" atf_add_test_case basic atf_add_test_case nohelp atf_add_test_case devfull diff --git a/sed b/sed @@ -0,0 +1,22 @@ +#!/usr/bin/env atf-sh +# Copyright © 2021 Haelwenn (lanodan) Monnier <contact+system-testsuite@hacktivis.me> +# SPDX-License-Identifier: BSD-3-Clause + +atf_test_case pcmd +pcmd_body() { + atf_check -o 'file:sed_bre_addr.fixture' sed -n p sed_bre_addr.fixture +} + +atf_test_case brepcmd +brepcmd_body() { + atf_check -o 'inline:line2 +line3 +line4 +' sed -n '/line2/,/line4/p' sed_bre_addr.fixture +} + +atf_init_test_cases() { + cd "$(atf_get_srcdir)" + atf_add_test_case pcmd + atf_add_test_case brepcmd +} diff --git a/true b/true @@ -18,7 +18,6 @@ devfull_body() { } atf_init_test_cases() { - cd "$(atf_get_srcdir)" atf_add_test_case basic atf_add_test_case nohelp atf_add_test_case devfull