Project

General

Profile

Feature #13036

grep tests could be easier to extend

Added by Robert Mustacchi 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Category:
tests
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The grep test suite is a little challenging to work with right now. In particular, it's designed so that there are multiple phases of tests. However, the set of output file names is used across all phases. Adding an additional test an earlier phase would mean renaming everything. Instead, we should just make these phases a part of the script. In addition there are a bunch of other small things that could be improved about the test suite:

  • Adding new phases shouldn't require duplicating the same bulk of logic every time
  • It could run all tests to completion, rather than stopping at the first failure.
  • It could actually tests non-zero cases
  • The temporary ends up trying to be in the same directory as the tests, when it could just be in /tmp.
  • When something is different or there's a missing output file, it could tell you the name of the file it expected

Also available in: Atom PDF