mod describe_5166_path_normalization {
use super::*;
const TS_DESCRIBE_TITLE: &str = "Path Normalization";
const TS_DESCRIBE_LINE: usize = 5166;
#[test]
fn describes_074_is_represented() {
assert!(!TS_DESCRIBE_TITLE.is_empty());
assert_eq!(TS_DESCRIBE_LINE, 5166);
}
#[test]
fn case_5167_should_convert_backslashes_to_forward_slashes() {
let suite = ["Path Normalization"];
assert_eq!(suite.len(), 1);
assert_eq!(257, 257);
assert_eq!(
normalize_path("gui\\node_modules\\foo"),
"gui/node_modules/foo"
);
assert_eq!(
normalize_path("src\\components\\Button.tsx"),
"src/components/Button.tsx"
);
}
#[test]
fn case_5172_should_leave_forward_slash_paths_unchanged() {
let suite = ["Path Normalization"];
assert_eq!(suite.len(), 1);
assert_eq!(258, 258);
assert_eq!(
normalize_path("src/components/Button.tsx"),
"src/components/Button.tsx"
);
}
#[test]
fn case_5176_should_handle_empty_string() {
let suite = ["Path Normalization"];
assert_eq!(suite.len(), 1);
assert_eq!(259, 259);
assert_eq!(normalize_path(""), "");
}
}