Skip to content

Commit

Permalink
fix: miri tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ten3roberts committed Dec 11, 2023
1 parent e3fd620 commit e61cf4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions color-eyre/src/section/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ pub trait Section: crate::private::Sealed {
/// ```rust
/// use color_eyre::{eyre::eyre, eyre::Report, Section, SectionExt};
///
/// # #[cfg(not(miri))]
/// # {
/// let output = std::process::Command::new("ls")
/// .output()?;
///
Expand All @@ -178,6 +180,7 @@ pub trait Section: crate::private::Sealed {
/// };
///
/// println!("{}", output);
/// # }
/// # Ok::<_, Report>(())
/// ```
fn with_section<D, F>(self, section: F) -> Self::Return
Expand Down
2 changes: 2 additions & 0 deletions color-eyre/tests/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ static ERROR_FILE_NAME: &str = "theme_error_control_spantrace.txt";
static ERROR_FILE_NAME: &str = "theme_error_control.txt";

#[test]
#[cfg(not(miri))]
fn test_error_backwards_compatibility() {
setup();
let error = get_error("test");
Expand Down Expand Up @@ -102,6 +103,7 @@ static PANIC_FILE_NAME: &str = "theme_panic_control.txt";
#[test]
#[allow(unused_mut)]
#[allow(clippy::vec_init_then_push)]
#[cfg(not(miri))]
fn test_panic_backwards_compatibility() {
let mut features: Vec<&str> = vec![];
#[cfg(feature = "capture-spantrace")]
Expand Down

0 comments on commit e61cf4e

Please sign in to comment.