HomeFreeBSD

Add more sanity tests for grep, egrep, and fgrep

Description

Add more sanity tests for grep, egrep, and fgrep

The test suite currently lacks basic sanity checks to ensure that egrep,
fgrep, and grep are actually matching the right expression types, i.e. passing
the right flags to regcomp(3). Amend the test suite to make sure that not only
are the individual versions doing the right thing, but also that we don't have some
kind of frankenregex situation happening where egrep is accepting a BRE or
grep an ERE.

I've chosen to not expand the 'basic' test but to add the 'grep_sanity' checks
to their own test case since this is testing for more than just 'grep matches things',
but actual expression types.

Differential Revision: D10444
Reviewed by: emaste, ngie
Submitted by: Kyle Evans <kevans91@ksu.edu>
Tested with: bsdgrep, gnu grep (base, ports)
Sponsored by: Dell EMC Isilon

Details

Provenance
ngieAuthored on
Reviewer
emaste
Differential Revision
D10444: grep(1) testing: More sanity checks, remove atf_expect_fail as now appropriate
Parents
rS317298: sh: Simplify setinteractive().
Branches
Unknown
Tags
Unknown