diff options
Diffstat (limited to 'core/lib.rs')
-rw-r--r-- | core/lib.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/lib.rs b/core/lib.rs index 3f4cdd2e0..e8ca36559 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -165,7 +165,13 @@ mod tests { fn located_script_name() { // Note that this test will fail if this file is moved. We don't // test line locations because that's just too brittle. - assert!(located_script_name!().starts_with("[ext:core/lib.rs:")); + let name = located_script_name!(); + let expected = if cfg!(windows) { + "[ext:core\\lib.rs:" + } else { + "[ext:core/lib.rs:" + }; + assert_eq!(&name[..expected.len()], expected); } #[test] |