Evolve grep output parsing heuristics
* Demand a non-space before extension
* New grep parse heuristic
If something like any of the following are seen then that is assumed
to be a file name with an extension followed by a line number. I.e. we
do not support file names with such patterns internally.
.xx-7-
.xx=7=
.xx:7:
* 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
When using `--navigate` with files that get their mode modified, the
file-modified label was not being prefixed, so these changes were not
being marked as skip destinations. This is particularly bad if a file
has line changes along with the mode change AND the user has an empty
hunk label (since that would make the entire file's changes get skipped
with an "n").
I added a test of a mode-change with a line-change, and a test for a
mode change where the old & new mode values are not one of the two
expected value-pairs. I also used format_file() on the mode filenames
since the other format() calls were using it.
We currently have no way of computing correct line numbers: it seems that we would need to identify
wholly added and removed lines from the ANSI color sequences. side-by-side is (I imagine) almost
always used with line numbers, and it doesn't make much sense for word-diff anyway.
* Do not query CPU data when querying process data
Fixes#839
Ref https://github.com/GuillaumeGomez/sysinfo/issues/632
* Update branch of sysinfo
* Update upstream sysinfo commit
Ref https://github.com/GuillaumeGomez/sysinfo/pull/636
* Point sysinfo at an explicit commit rather than a symbolic branch name
commit d647acfbf216848a8237e1f9251b2c48860a547f
Merge: 989ac6c 67a586c
Author: Guillaume Gomez <guillaume1.gomez@gmail.com>
Date: 2 hours ago
Merge pull request #636 from GuillaumeGomez/update-if-needed
Only update processors if needed