core: fix broken tests on windows

This commit is contained in:
Jeff Olson 2013-03-06 22:02:01 -08:00 committed by Brian Anderson
parent 25c3c363a8
commit a04ba76f8e
2 changed files with 3 additions and 3 deletions

View File

@ -1409,9 +1409,8 @@ mod tests {
setenv(~"USERPROFILE", ~"/home/PaloAlto");
fail_unless!(os::homedir() == Some(Path("/home/MountainView")));
option::iter(&oldhome, |s| setenv(~"HOME", *s));
option::iter(&olduserprofile,
|s| setenv(~"USERPROFILE", *s));
oldhome.each(|s| {setenv(~"HOME", *s);true});
olduserprofile.each(|s| {setenv(~"USERPROFILE", *s);true});
}
#[test]

View File

@ -2692,6 +2692,7 @@ mod tests {
#[test]
#[should_fail]
#[ignore(cfg(windows))]
fn test_last_empty() {
let a: ~[int] = ~[];
a.last();