diff options
author | Wayne Davison <wayne@opencoder.net> | 2022-01-04 00:39:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-04 03:39:03 -0500 |
commit | 1d6f18a6630825cefa4c6cd714e8103dd8a95cde (patch) | |
tree | f6ce03fa63ed9ec4f7a8d2e6fd837eb1a5a19bf5 /src/style.rs | |
parent | cd47b21176b19eb700562dcb0999ef4b99c6a893 (diff) |
DeltaTest improvements (#876)
* DeltaTest improvements
- Added .expect_contains(), .expect_raw_contains(), and
.expect_contains_once() member functions to DeltaTestOutput.
These functions also output some helpful debug info when the
assert fails.
- Separated .with_config_and_input() into .with_config() and (the
tweaked) .with_input().
- Made .with_config() create a DeltaTest object (like .with() does).
- Renamed .with() as .with_args().
- Moved .explain_ansi() from DeltaTestOutput to DeltaTest, which must
now be called prior to .with_input() since the latter stashes off both
the raw_output & the processed output in the object.
- Changed .expect() and .expect_skip() to return Self so that they can
continue a chain of multiple expect calls (e.g. a series of partial
matches with different skip values).
- The processed output text can be accessed via `test_obj.output` (see
also `test_obj.raw_output`).
- Renamed .expect_skip() to .expect_after_skip().
- Changed .expect() to start at the first line.
- Added .expect_after_header() that works like the old .expect().
- Renamed lines_match() to assert_lines_match() and made it match all
lines (no skip number).
- Added assert_lines_match_after_skip() to work like the old
lines_match() function, but with the .expect_after_skip() arg order.
- Converted some old-style tests into DeltaTest style tests.
- Renamed set_cfg as set_config
Diffstat (limited to 'src/style.rs')
0 files changed, 0 insertions, 0 deletions