mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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
This commit is contained in:
parent
5982237f1e
commit
003818aca4
1 changed files with 23 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue