mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2024-12-12 19:18:24 +02:00
eb184d7711
This basically rewrites every integration test. We reduce the amount of magic involved here in terms of which arguments are being passed to ripgrep processes. To make up for the boiler plate saved by the magic, we make the Dir (formerly WorkDir) type a bit nicer to use, along with a new TestCommand that wraps a std::process::Command. In exchange, we get tests that are easier to read and write. We also run every test with the `--pcre2` flag to make sure that works, when PCRE2 is available.
18 lines
834 B
Rust
18 lines
834 B
Rust
pub const SHERLOCK: &'static str = "\
|
|
For the Doctor Watsons of this world, as opposed to the Sherlock
|
|
Holmeses, success in the province of detective work must always
|
|
be, to a very large extent, the result of luck. Sherlock Holmes
|
|
can extract a clew from a wisp of straw or a flake of cigar ash;
|
|
but Doctor Watson has to have it taken out for him and dusted,
|
|
and exhibited clearly, with a label attached.
|
|
";
|
|
|
|
pub const SHERLOCK_CRLF: &'static str = "\
|
|
For the Doctor Watsons of this world, as opposed to the Sherlock\r
|
|
Holmeses, success in the province of detective work must always\r
|
|
be, to a very large extent, the result of luck. Sherlock Holmes\r
|
|
can extract a clew from a wisp of straw or a flake of cigar ash;\r
|
|
but Doctor Watson has to have it taken out for him and dusted,\r
|
|
and exhibited clearly, with a label attached.\r
|
|
";
|