cli: add --no-unicode, deprecate --no-pcre2-unicode

This adds a universal --no-unicode flag that is intended to work for all
supported regex engines. There is no point in retaining
--no-pcre2-unicode, so we make them aliases to the new flags and
deprecate them.
This commit is contained in:
Andrew Gallant
2020-02-17 15:34:59 -05:00
parent 711426a632
commit 75cbe88fa2
5 changed files with 90 additions and 34 deletions

View File

@@ -834,3 +834,8 @@ rgtest!(context_sep_empty, |dir: Dir, mut cmd: TestCommand| {
]);
eqnice!("foo\nctx\n\nfoo\nctx\n", cmd.stdout());
});
rgtest!(no_unicode, |dir: Dir, mut cmd: TestCommand| {
dir.create("test", "δ");
cmd.arg("-i").arg("--no-unicode").arg("Δ").assert_err();
});