mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-03 12:35:02 +00:00
netbsd-tests: bsdgrep(1): Add a test for -m, too
This commit is contained in:
parent
66f780aee0
commit
52cf896593
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334809
@ -732,6 +732,22 @@ cflag_body()
|
||||
|
||||
atf_check -o inline:"test1:2\n" grep -EHc "a|b" test1
|
||||
}
|
||||
|
||||
atf_test_case mflag
|
||||
mflag_head()
|
||||
{
|
||||
atf_set "descr" "Check proper handling of -m"
|
||||
}
|
||||
mflag_body()
|
||||
{
|
||||
printf "a\nb\nc\nd\ne\nf\n" > test1
|
||||
|
||||
atf_check -o inline:"1\n" grep -m 1 -Ec "a" test1
|
||||
atf_check -o inline:"2\n" grep -m 2 -Ec "a|b" test1
|
||||
atf_check -o inline:"3\n" grep -m 3 -Ec "a|b|c|f" test1
|
||||
|
||||
atf_check -o inline:"test1:2\n" grep -m 2 -EHc "a|b|e|f" test1
|
||||
}
|
||||
# End FreeBSD
|
||||
|
||||
atf_init_test_cases()
|
||||
@ -776,5 +792,6 @@ atf_init_test_cases()
|
||||
atf_add_test_case fgrep_icase
|
||||
atf_add_test_case fgrep_oflag
|
||||
atf_add_test_case cflag
|
||||
atf_add_test_case mflag
|
||||
# End FreeBSD
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user