diff options
| author | bors <bors@rust-lang.org> | 2013-09-16 11:30:42 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-16 11:30:42 -0700 |
| commit | 0ec4d34b3f0fa1897ace96475a32ff0c8e15b33b (patch) | |
| tree | ac2eb072f640149efa009fdf710f7aa8fe2a523a /src/libstd/rt/io | |
| parent | 250c3d47dfb56c0ef5581b8ff65958b226dc656a (diff) | |
| parent | 6d9c399ee2a462f14631fe2df905d16fad9a8143 (diff) | |
| download | rust-0ec4d34b3f0fa1897ace96475a32ff0c8e15b33b.tar.gz rust-0ec4d34b3f0fa1897ace96475a32ff0c8e15b33b.zip | |
auto merge of #9211 : klutzy/rust/win32-fix, r=alexcrichton
Diffstat (limited to 'src/libstd/rt/io')
| -rw-r--r-- | src/libstd/rt/io/file.rs | 8 | ||||
| -rw-r--r-- | src/libstd/rt/io/net/tcp.rs | 9 | ||||
| -rw-r--r-- | src/libstd/rt/io/support.rs | 3 |
3 files changed, 11 insertions, 9 deletions
diff --git a/src/libstd/rt/io/file.rs b/src/libstd/rt/io/file.rs index 3bc0e74c782..c24f4eb257e 100644 --- a/src/libstd/rt/io/file.rs +++ b/src/libstd/rt/io/file.rs @@ -168,7 +168,6 @@ fn file_test_smoke_test_impl() { } #[test] -#[ignore(cfg(windows))] // FIXME #8810 fn file_test_io_smoke_test() { file_test_smoke_test_impl(); } @@ -236,7 +235,6 @@ fn file_test_io_non_positional_read_impl() { } #[test] -#[ignore(cfg(windows))] // FIXME #8810 fn file_test_io_non_positional_read() { file_test_io_non_positional_read_impl(); } @@ -268,8 +266,8 @@ fn file_test_io_seeking_impl() { assert!(tell_pos_post_read == message.len() as u64); } } + #[test] -#[ignore(cfg(windows))] // FIXME #8810 fn file_test_io_seek_and_tell_smoke_test() { file_test_io_seeking_impl(); } @@ -300,8 +298,8 @@ fn file_test_io_seek_and_write_impl() { assert!(read_str == final_msg.to_owned()); } } + #[test] -#[ignore(cfg(windows))] // FIXME #8810 fn file_test_io_seek_and_write() { file_test_io_seek_and_write_impl(); } @@ -340,8 +338,8 @@ fn file_test_io_seek_shakedown_impl() { unlink(filename); } } + #[test] -#[ignore(cfg(windows))] // FIXME #8810 fn file_test_io_seek_shakedown() { file_test_io_seek_shakedown_impl(); } diff --git a/src/libstd/rt/io/net/tcp.rs b/src/libstd/rt/io/net/tcp.rs index be8a051a066..55abc4ab135 100644 --- a/src/libstd/rt/io/net/tcp.rs +++ b/src/libstd/rt/io/net/tcp.rs @@ -178,12 +178,17 @@ mod test { } #[test] - #[ignore(cfg(windows))] // FIXME #8811 fn connect_error() { do run_in_mt_newsched_task { let mut called = false; do io_error::cond.trap(|e| { - assert_eq!(e.kind, ConnectionRefused); + let expected_error = if cfg!(unix) { + ConnectionRefused + } else { + // On Win32, opening port 1 gives WSAEADDRNOTAVAIL error. + OtherIoError + }; + assert_eq!(e.kind, expected_error); called = true; }).inside { let addr = SocketAddr { ip: Ipv4Addr(0, 0, 0, 0), port: 1 }; diff --git a/src/libstd/rt/io/support.rs b/src/libstd/rt/io/support.rs index afbff77f988..59db8194963 100644 --- a/src/libstd/rt/io/support.rs +++ b/src/libstd/rt/io/support.rs @@ -33,9 +33,8 @@ mod test { use super::PathLike; #[test] - #[ignore(cfg(windows))] // FIXME #8812 fn path_like_smoke_test() { - let expected = "/home"; + let expected = if cfg!(unix) { "/home" } else { "C:\\" }; let path = Path(expected); path.path_as_str(|p| assert!(p == expected)); path.path_as_str(|p| assert!(p == expected)); |
