HomeFreeBSD

du: tests: make H_flag tests more strict about output requirements

Description

du: tests: make H_flag tests more strict about output requirements

The current version of this test will effectively pass as long as one of the
specified paths is in the output, and it could even be a subset of one of
the paths.

Strengthen up the test a little bit:

  • Specify beginning/end anchors for each path
  • Add egrep -v checks to make sure we don't have any *additional* paths
  • Ratchet down paths2 to exactly the two paths we expect to appear

Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D27984

Details

Provenance
kevansAuthored on Jan 5 2021, 9:49 PM
Reviewer
ngie
Differential Revision
D27984: du: tests: make H_flag tests more strict about output requirements
Parents
rG4832d2e8ae1d: du: tests: fix the H_flag test (primarily grep usage)
Branches
Unknown
Tags
Unknown