Skip to content

Commit ed80321

Browse files
committed
test: disable some tests on non-64-bit
Some doc tests make 64-bit assumptions and fail on 32-bit. I'd be open to perhaps refactoring the tests somehow to make them work on both, but I literally have no easy way to run doc tests in a 32-bit environment. Without being able to actually run them myself, I don't feel comfortable doing anything other than squashing the tests in that case. Closes #1041
1 parent f967147 commit ed80321

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

regex-lite/src/string.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2063,6 +2063,7 @@ impl<'h, 'n> core::ops::Index<&'n str> for Captures<'h> {
20632063
/// This example shows how to create and use `CaptureLocations` in a search.
20642064
///
20652065
/// ```
2066+
/// # if !cfg!(target_pointer_width = "64") { return; } // see #1041
20662067
/// use regex_lite::Regex;
20672068
///
20682069
/// let re = Regex::new(r"(?<first>\w+)\s+(?<last>\w+)").unwrap();

src/builders.rs

+4
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ pub(crate) mod string {
679679
/// # Example
680680
///
681681
/// ```
682+
/// # if !cfg!(target_pointer_width = "64") { return; } // see #1041
682683
/// use regex::RegexBuilder;
683684
///
684685
/// // It may surprise you how big some seemingly small patterns can
@@ -1246,6 +1247,7 @@ pub(crate) mod string {
12461247
/// # Example
12471248
///
12481249
/// ```
1250+
/// # if !cfg!(target_pointer_width = "64") { return; } // see #1041
12491251
/// use regex::RegexSetBuilder;
12501252
///
12511253
/// // It may surprise you how big some seemingly small patterns can
@@ -1856,6 +1858,7 @@ pub(crate) mod bytes {
18561858
/// # Example
18571859
///
18581860
/// ```
1861+
/// # if !cfg!(target_pointer_width = "64") { return; } // see #1041
18591862
/// use regex::bytes::RegexBuilder;
18601863
///
18611864
/// // It may surprise you how big some seemingly small patterns can
@@ -2428,6 +2431,7 @@ pub(crate) mod bytes {
24282431
/// # Example
24292432
///
24302433
/// ```
2434+
/// # if !cfg!(target_pointer_width = "64") { return; } // see #1041
24312435
/// use regex::bytes::RegexSetBuilder;
24322436
///
24332437
/// // It may surprise you how big some seemingly small patterns can

src/regex/bytes.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2025,6 +2025,7 @@ impl<'h, 'n> core::ops::Index<&'n str> for Captures<'h> {
20252025
/// This example shows how to create and use `CaptureLocations` in a search.
20262026
///
20272027
/// ```
2028+
/// # if !cfg!(target_pointer_width = "64") { return; } // see #1041
20282029
/// use regex::bytes::Regex;
20292030
///
20302031
/// let re = Regex::new(r"(?<first>\w+)\s+(?<last>\w+)").unwrap();

src/regex/string.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,7 @@ impl<'h, 'n> core::ops::Index<&'n str> for Captures<'h> {
20282028
/// This example shows how to create and use `CaptureLocations` in a search.
20292029
///
20302030
/// ```
2031+
/// # if !cfg!(target_pointer_width = "64") { return; } // see #1041
20312032
/// use regex::Regex;
20322033
///
20332034
/// let re = Regex::new(r"(?<first>\w+)\s+(?<last>\w+)").unwrap();

0 commit comments

Comments
 (0)