Skip to content

Commit

Permalink
Fix full path detection on windows systems [run ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
50U10FCA7 committed Sep 22, 2023
1 parent d1a2afc commit 22b9017
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ mod spec {

use super::{DebugWriter, World};

/// [`Regex`] to transform full paths to relative paths.
static FULL_PATH: &Lazy<Regex> =
regex!("/(.*)/tests/features/output/(\\S+).feature");
/// [`Regex`] to transform full paths (both unix-like and windows) to a
/// relative paths.
static FULL_PATH: &Lazy<Regex> = regex!(
"(?:\\?\\\\\\\\|\\/).*(?:\\\\\\\\|\\/)tests(?:\\\\\\\\|\\/)\
features(?:\\\\\\\\|\\/)output(?:\\\\\\\\|\\/)(\\S+)\\.feature"
);

/// Format to replace [`FULL_PATH`] with.
const RELATIVE_PATH: &str = "tests/features/output/$2.feature";
const RELATIVE_PATH: &str = "tests/features/output/$1.feature";

/// [`Regex`] to make `cargo careful` assertion output match `cargo test`
/// output.
Expand Down

0 comments on commit 22b9017

Please sign in to comment.