summaryrefslogtreecommitdiffstats
path: root/vendor/regex-automata/debian/patches/disable-tests-missing-testdata.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/regex-automata/debian/patches/disable-tests-missing-testdata.patch')
-rw-r--r--vendor/regex-automata/debian/patches/disable-tests-missing-testdata.patch495
1 files changed, 495 insertions, 0 deletions
diff --git a/vendor/regex-automata/debian/patches/disable-tests-missing-testdata.patch b/vendor/regex-automata/debian/patches/disable-tests-missing-testdata.patch
new file mode 100644
index 0000000..318cd60
--- /dev/null
+++ b/vendor/regex-automata/debian/patches/disable-tests-missing-testdata.patch
@@ -0,0 +1,495 @@
+Index: regex-automata/tests/dfa/suite.rs
+===================================================================
+--- regex-automata.orig/tests/dfa/suite.rs
++++ regex-automata/tests/dfa/suite.rs
+@@ -16,12 +16,12 @@ use {
+ },
+ };
+
+-use crate::{create_input, suite, untestify_kind};
++use crate::{create_input, untestify_kind};
+
+ const EXPANSIONS: &[&str] = &["is_match", "find", "which"];
+
+ /// Runs the test suite with the default configuration.
+-#[test]
++/*#[test]
+ fn unminimized_default() -> Result<()> {
+ let builder = Regex::builder();
+ TestRunner::new()?
+@@ -30,11 +30,11 @@ fn unminimized_default() -> Result<()> {
+ .test_iter(suite()?.iter(), dense_compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Runs the test suite with the default configuration and a prefilter enabled,
+ /// if one can be built.
+-#[test]
++/*#[test]
+ fn unminimized_prefilter() -> Result<()> {
+ let my_compiler = |test: &RegexTest, regexes: &[String]| {
+ // Parse regexes as HIRs so we can get literals to build a prefilter.
+@@ -61,10 +61,10 @@ fn unminimized_prefilter() -> Result<()>
+ .test_iter(suite()?.iter(), my_compiler)
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Runs the test suite with start states specialized.
+-#[test]
++/*#[test]
+ fn unminimized_specialized_start_states() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.dense(dense::Config::new().specialize_start_states(true));
+@@ -75,10 +75,10 @@ fn unminimized_specialized_start_states(
+ .test_iter(suite()?.iter(), dense_compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Runs the test suite with byte classes disabled.
+-#[test]
++/*#[test]
+ fn unminimized_no_byte_class() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.dense(dense::Config::new().byte_classes(false));
+@@ -89,10 +89,10 @@ fn unminimized_no_byte_class() -> Result
+ .test_iter(suite()?.iter(), dense_compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Runs the test suite with NFA shrinking enabled.
+-#[test]
++/*#[test]
+ fn unminimized_nfa_shrink() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.thompson(thompson::Config::new().shrink(true));
+@@ -103,11 +103,11 @@ fn unminimized_nfa_shrink() -> Result<()
+ .test_iter(suite()?.iter(), dense_compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Runs the test suite on a minimized DFA with an otherwise default
+ /// configuration.
+-#[test]
++/*#[test]
+ fn minimized_default() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.dense(dense::Config::new().minimize(true));
+@@ -117,10 +117,10 @@ fn minimized_default() -> Result<()> {
+ .test_iter(suite()?.iter(), dense_compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Runs the test suite on a minimized DFA with byte classes disabled.
+-#[test]
++/*#[test]
+ fn minimized_no_byte_class() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.dense(dense::Config::new().minimize(true).byte_classes(false));
+@@ -131,10 +131,10 @@ fn minimized_no_byte_class() -> Result<(
+ .test_iter(suite()?.iter(), dense_compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Runs the test suite on a sparse unminimized DFA.
+-#[test]
++/*#[test]
+ fn sparse_unminimized_default() -> Result<()> {
+ let builder = Regex::builder();
+ TestRunner::new()?
+@@ -143,10 +143,10 @@ fn sparse_unminimized_default() -> Resul
+ .test_iter(suite()?.iter(), sparse_compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Runs the test suite on a sparse unminimized DFA with prefilters enabled.
+-#[test]
++/*#[test]
+ fn sparse_unminimized_prefilter() -> Result<()> {
+ let my_compiler = |test: &RegexTest, regexes: &[String]| {
+ // Parse regexes as HIRs so we can get literals to build a prefilter.
+@@ -176,11 +176,11 @@ fn sparse_unminimized_prefilter() -> Res
+ .test_iter(suite()?.iter(), my_compiler)
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Another basic sanity test that checks we can serialize and then deserialize
+ /// a regex, and that the resulting regex can be used for searching correctly.
+-#[test]
++/*#[test]
+ fn serialization_unminimized_default() -> Result<()> {
+ let builder = Regex::builder();
+ let my_compiler = |builder| {
+@@ -205,12 +205,12 @@ fn serialization_unminimized_default() -
+ .test_iter(suite()?.iter(), my_compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// A basic sanity test that checks we can serialize and then deserialize a
+ /// regex using sparse DFAs, and that the resulting regex can be used for
+ /// searching correctly.
+-#[test]
++/*#[test]
+ fn sparse_serialization_unminimized_default() -> Result<()> {
+ let builder = Regex::builder();
+ let my_compiler = |builder| {
+@@ -234,7 +234,7 @@ fn sparse_serialization_unminimized_defa
+ .test_iter(suite()?.iter(), my_compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ fn dense_compiler(
+ builder: dfa::regex::Builder,
+Index: regex-automata/tests/hybrid/suite.rs
+===================================================================
+--- regex-automata.orig/tests/hybrid/suite.rs
++++ regex-automata/tests/hybrid/suite.rs
+@@ -15,12 +15,12 @@ use {
+ },
+ };
+
+-use crate::{create_input, suite, untestify_kind};
++use crate::{create_input, untestify_kind};
+
+ const EXPANSIONS: &[&str] = &["is_match", "find", "which"];
+
+ /// Tests the default configuration of the hybrid NFA/DFA.
+-#[test]
++/*#[test]
+ fn default() -> Result<()> {
+ let builder = Regex::builder();
+ TestRunner::new()?
+@@ -30,10 +30,10 @@ fn default() -> Result<()> {
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the hybrid NFA/DFA with prefilters enabled.
+-#[test]
++/*#[test]
+ fn prefilter() -> Result<()> {
+ let my_compiler = |test: &RegexTest, regexes: &[String]| {
+ // Parse regexes as HIRs so we can get literals to build a prefilter.
+@@ -57,7 +57,7 @@ fn prefilter() -> Result<()> {
+ .test_iter(suite()?.iter(), my_compiler)
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the hybrid NFA/DFA with NFA shrinking enabled.
+ ///
+@@ -71,7 +71,7 @@ fn prefilter() -> Result<()> {
+ /// Nevertheless, we test to make sure everything is OK with NFA shrinking. As
+ /// a bonus, there are some tests we don't need to skip because they now fit in
+ /// the default cache capacity.
+-#[test]
++/*#[test]
+ fn nfa_shrink() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.thompson(thompson::Config::new().shrink(true));
+@@ -80,11 +80,11 @@ fn nfa_shrink() -> Result<()> {
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the hybrid NFA/DFA when 'starts_for_each_pattern' is enabled for all
+ /// tests.
+-#[test]
++/*#[test]
+ fn starts_for_each_pattern() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.dfa(DFA::config().starts_for_each_pattern(true));
+@@ -95,10 +95,10 @@ fn starts_for_each_pattern() -> Result<(
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the hybrid NFA/DFA when 'specialize_start_states' is enabled.
+-#[test]
++/*#[test]
+ fn specialize_start_states() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.dfa(DFA::config().specialize_start_states(true));
+@@ -109,14 +109,14 @@ fn specialize_start_states() -> Result<(
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the hybrid NFA/DFA when byte classes are disabled.
+ ///
+ /// N.B. Disabling byte classes doesn't avoid any indirection at search time.
+ /// All it does is cause every byte value to be its own distinct equivalence
+ /// class.
+-#[test]
++/*#[test]
+ fn no_byte_classes() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.dfa(DFA::config().byte_classes(false));
+@@ -127,7 +127,7 @@ fn no_byte_classes() -> Result<()> {
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests that hybrid NFA/DFA never clears its cache for any test with the
+ /// default capacity.
+@@ -135,7 +135,7 @@ fn no_byte_classes() -> Result<()> {
+ /// N.B. If a regex suite test is added that causes the cache to be cleared,
+ /// then this should just skip that test. (Which can be done by calling the
+ /// 'blacklist' method on 'TestRunner'.)
+-#[test]
++/*#[test]
+ fn no_cache_clearing() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.dfa(DFA::config().minimum_cache_clear_count(Some(0)));
+@@ -146,10 +146,10 @@ fn no_cache_clearing() -> Result<()> {
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the hybrid NFA/DFA when the minimum cache capacity is set.
+-#[test]
++/*#[test]
+ fn min_cache_capacity() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder
+@@ -159,7 +159,7 @@ fn min_cache_capacity() -> Result<()> {
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ fn compiler(
+ mut builder: regex::Builder,
+Index: regex-automata/tests/lib.rs
+===================================================================
+--- regex-automata.orig/tests/lib.rs
++++ regex-automata/tests/lib.rs
+@@ -28,7 +28,7 @@ mod meta;
+ #[cfg(any(feature = "nfa-backtrack", feature = "nfa-pikevm"))]
+ mod nfa;
+
+-fn suite() -> anyhow::Result<regex_test::RegexTests> {
++/*fn suite() -> anyhow::Result<regex_test::RegexTests> {
+ let _ = env_logger::try_init();
+
+ let mut tests = regex_test::RegexTests::new();
+@@ -66,7 +66,7 @@ fn suite() -> anyhow::Result<regex_test:
+ load!("fowler/repetition");
+
+ Ok(tests)
+-}
++}*/
+
+ /// Configure a regex_automata::Input with the given test configuration.
+ fn create_input<'h>(
+Index: regex-automata/tests/meta/suite.rs
+===================================================================
+--- regex-automata.orig/tests/meta/suite.rs
++++ regex-automata/tests/meta/suite.rs
+@@ -11,7 +11,7 @@ use {
+ },
+ };
+
+-use crate::{create_input, suite, testify_captures};
++use crate::{create_input, testify_captures};
+
+ const BLACKLIST: &[&str] = &[
+ // These 'earliest' tests are blacklisted because the meta searcher doesn't
+@@ -27,7 +27,7 @@ const BLACKLIST: &[&str] = &[
+ ];
+
+ /// Tests the default configuration of the meta regex engine.
+-#[test]
++/*#[test]
+ fn default() -> Result<()> {
+ let builder = Regex::builder();
+ let mut runner = TestRunner::new()?;
+@@ -37,10 +37,10 @@ fn default() -> Result<()> {
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the default configuration minus the full DFA.
+-#[test]
++/*#[test]
+ fn no_dfa() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.configure(Regex::config().dfa(false));
+@@ -51,10 +51,10 @@ fn no_dfa() -> Result<()> {
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the default configuration minus the full DFA and lazy DFA.
+-#[test]
++/*#[test]
+ fn no_dfa_hybrid() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.configure(Regex::config().dfa(false).hybrid(false));
+@@ -65,11 +65,11 @@ fn no_dfa_hybrid() -> Result<()> {
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the default configuration minus the full DFA, lazy DFA and one-pass
+ /// DFA.
+-#[test]
++/*#[test]
+ fn no_dfa_hybrid_onepass() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.configure(Regex::config().dfa(false).hybrid(false).onepass(false));
+@@ -80,11 +80,11 @@ fn no_dfa_hybrid_onepass() -> Result<()>
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the default configuration minus the full DFA, lazy DFA, one-pass
+ /// DFA and backtracker.
+-#[test]
++/*#[test]
+ fn no_dfa_hybrid_onepass_backtrack() -> Result<()> {
+ let mut builder = Regex::builder();
+ builder.configure(
+@@ -101,7 +101,7 @@ fn no_dfa_hybrid_onepass_backtrack() ->
+ .test_iter(suite()?.iter(), compiler(builder))
+ .assert();
+ Ok(())
+-}
++}*/
+
+ fn compiler(
+ mut builder: meta::Builder,
+Index: regex-automata/tests/nfa/thompson/backtrack/suite.rs
+===================================================================
+--- regex-automata.orig/tests/nfa/thompson/backtrack/suite.rs
++++ regex-automata/tests/nfa/thompson/backtrack/suite.rs
+@@ -15,10 +15,10 @@ use {
+ },
+ };
+
+-use crate::{create_input, suite, testify_captures};
++use crate::{create_input, testify_captures};
+
+ /// Tests the default configuration of the bounded backtracker.
+-#[test]
++/*#[test]
+ fn default() -> Result<()> {
+ let builder = BoundedBacktracker::builder();
+ let mut runner = TestRunner::new()?;
+@@ -34,10 +34,10 @@ fn default() -> Result<()> {
+ runner.blacklist("expensive/backtrack-blow-visited-capacity");
+ runner.test_iter(suite()?.iter(), compiler(builder)).assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the backtracker with prefilters enabled.
+-#[test]
++/*#[test]
+ fn prefilter() -> Result<()> {
+ let my_compiler = |test: &RegexTest, regexes: &[String]| {
+ // Parse regexes as HIRs so we can get literals to build a prefilter.
+@@ -60,11 +60,11 @@ fn prefilter() -> Result<()> {
+ runner.blacklist("expensive/backtrack-blow-visited-capacity");
+ runner.test_iter(suite()?.iter(), my_compiler).assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the bounded backtracker when its visited capacity is set to its
+ /// minimum amount.
+-#[test]
++/*#[test]
+ fn min_visited_capacity() -> Result<()> {
+ let mut runner = TestRunner::new()?;
+ runner.expand(&["is_match", "find", "captures"], |test| test.compiles());
+@@ -95,7 +95,7 @@ fn min_visited_capacity() -> Result<()>
+ })
+ .assert();
+ Ok(())
+-}
++}*/
+
+ fn compiler(
+ mut builder: backtrack::Builder,
+Index: regex-automata/tests/nfa/thompson/pikevm/suite.rs
+===================================================================
+--- regex-automata.orig/tests/nfa/thompson/pikevm/suite.rs
++++ regex-automata/tests/nfa/thompson/pikevm/suite.rs
+@@ -14,20 +14,20 @@ use {
+ },
+ };
+
+-use crate::{create_input, suite, testify_captures, untestify_kind};
++use crate::{create_input, testify_captures, untestify_kind};
+
+ /// Tests the default configuration of the hybrid NFA/DFA.
+-#[test]
++/*#[test]
+ fn default() -> Result<()> {
+ let builder = PikeVM::builder();
+ let mut runner = TestRunner::new()?;
+ runner.expand(&["is_match", "find", "captures"], |test| test.compiles());
+ runner.test_iter(suite()?.iter(), compiler(builder)).assert();
+ Ok(())
+-}
++}*/
+
+ /// Tests the PikeVM with prefilters enabled.
+-#[test]
++/*#[test]
+ fn prefilter() -> Result<()> {
+ let my_compiler = |test: &RegexTest, regexes: &[String]| {
+ // Parse regexes as HIRs so we can get literals to build a prefilter.
+@@ -48,7 +48,7 @@ fn prefilter() -> Result<()> {
+ runner.expand(&["is_match", "find", "captures"], |test| test.compiles());
+ runner.test_iter(suite()?.iter(), my_compiler).assert();
+ Ok(())
+-}
++}*/
+
+ fn compiler(
+ mut builder: pikevm::Builder,