Skip to content
Myr

tests: gate forward-slash+full-path test off Windows

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com> On Windows the regex-over-full-path match uses `\`, so the pattern `one/two/c` cannot match a real entry. The diagnostic- didn't-fire behaviour this test pins is already covered by the fact that the invocation does not error. Gate it to non-Windows per tmccombs's CI feedback on the PR.

authored by SAY-5 · committed by SAY-5 · parent 4f4900b · Browse files · 1 file+7 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−0 removed

  • tests:+7 added−0 removed

1 file+7 added−0 removed

modified:tests/tests.rs+7 added
397 unmodified lines
398399/// --full-path is the user's explicit opt-in to regex-over-full-path matching,400/// so a path-separation character in the pattern is expected and must not401/// trigger the diagnostic.402///403/// Gated off Windows: the actual match is regex-over-the-full-path, so a404/// forward-slash pattern only matches Unix-style paths. On Windows the OS405/// uses `\` and `one/two/c` (as a literal regex) does not match a real406/// entry — the behaviour this test is pinning (the diagnostic does not407/// fire) is covered by the fact that the invocation does not error.408#[test]409#[cfg(not(windows))]410fn test_pattern_with_forward_slash_allowed_with_full_path() {411 let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);412413 te.assert_output(
2390 unmodified lines