netbsd-tests: bsdgrep(1): Add a test for -m, too
This commit is contained in:
parent
a881d5620d
commit
b35b5a1c12
@ -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…
x
Reference in New Issue
Block a user