Skip to content

Commit 32a5ad8

Browse files
committed
core: fix broken tests on windows
1 parent e28af23 commit 32a5ad8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libcore/os.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,9 +1409,8 @@ mod tests {
14091409
setenv(~"USERPROFILE", ~"/home/PaloAlto");
14101410
fail_unless!(os::homedir() == Some(Path("/home/MountainView")));
14111411
1412-
option::iter(&oldhome, |s| setenv(~"HOME", *s));
1413-
option::iter(&olduserprofile,
1414-
|s| setenv(~"USERPROFILE", *s));
1412+
oldhome.each(|s| {setenv(~"HOME", *s);true});
1413+
olduserprofile.each(|s| {setenv(~"USERPROFILE", *s);true});
14151414
}
14161415
14171416
#[test]

src/libcore/vec.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2695,6 +2695,7 @@ mod tests {
26952695

26962696
#[test]
26972697
#[should_fail]
2698+
#[ignore(cfg(windows))]
26982699
fn test_last_empty() {
26992700
let a: ~[int] = ~[];
27002701
a.last();

0 commit comments

Comments
 (0)