File: 1001_fence_features.patch

package info (click to toggle)
rust-lazy-regex 3.4.2%2B20251114-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 224 kB
  • sloc: makefile: 11; sh: 1
file content (82 lines) | stat: -rw-r--r-- 2,187 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Description: add feature fences
Author: Jonas Smedegaard <dr@jones.dk>
Author: Noisycoil <noisycoil@tutanota.com>
Author: Peter Michael Green <plugwash@debian.org>
Bug-Debian: https://bugs.debian.org/1089894
Bug-Debian: https://bugs.debian.org/1089917
Last-Update: 2024-12-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -271,7 +271,7 @@
     once_cell::sync::Lazy,
 };
 
-#[cfg(not(feature = "lite"))]
+#[cfg(all(not(feature = "lite"), feature = "regex"))]
 pub use {
     regex::{
         self,
--- a/tests/replace.rs
+++ b/tests/replace.rs
@@ -2,6 +2,7 @@
 /// check replacement with a mut closure
 /// See https://github.com/Canop/lazy-regex/issues/27
 #[test]
+#[cfg(feature = "unicode-perl")]
 fn replace_with_mut_closure() {
     let input = "5+183/32";
     let mut last_digits: Vec<u8> = Vec::new();
--- a/tests/regex_if.rs
+++ b/tests/regex_if.rs
@@ -7,6 +7,7 @@
 };
 
 #[test]
+#[cfg(any(feature = "unicode", feature = "lite"))]
 fn test_regex_if() {
     fn extract_grey_level(s: &str) -> Option<u16> {
         regex_if!(
@@ -22,6 +23,7 @@
 }
 
 #[test]
+#[cfg(any(feature = "unicode", feature = "lite"))]
 fn test_regex_if_with_error_handling() {
     fn extract_grey_level(s: &str) -> Result<Option<u8>, ParseIntError> {
         let v = regex_if!(r#"^gr(a|e)y\((?<level>\d{1,3})\)$"#, s, level.parse()?);
@@ -33,6 +35,7 @@
 }
 
 #[test]
+#[cfg(all(feature = "unicode", not(feature = "lite")))]
 fn test_bytes_regex_if() {
     fn extract_grey_level(s: &[u8]) -> Option<u16> {
         bytes_regex_if!(
--- a/tests/regex_switch.rs
+++ b/tests/regex_switch.rs
@@ -4,6 +4,7 @@
 };
 
 #[test]
+#[cfg(any(feature = "unicode", feature = "lite"))]
 fn test_regex_switch() {
     #[derive(Debug, PartialEq, Eq)]
     enum Color {
@@ -32,6 +33,7 @@
 }
 
 #[test]
+#[cfg(any(feature = "unicode", feature = "lite"))]
 fn test_regex_switch_with_error_handling() -> Result<(), ParseIntError> {
     #[derive(Debug, PartialEq)]
     enum Color {
@@ -56,6 +58,7 @@
 }
 
 #[test]
+#[cfg(all(feature = "unicode", not(feature = "lite")))]
 fn test_bytes_regex_switch() {
     #[derive(Debug, PartialEq, Eq)]
     enum Color {