From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix/tests/io/error.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 vendor/rustix/tests/io/error.rs (limited to 'vendor/rustix/tests/io/error.rs') diff --git a/vendor/rustix/tests/io/error.rs b/vendor/rustix/tests/io/error.rs new file mode 100644 index 000000000..128d3b59a --- /dev/null +++ b/vendor/rustix/tests/io/error.rs @@ -0,0 +1,14 @@ +#[test] +fn test_error() { + assert_eq!( + rustix::io::Errno::INVAL, + rustix::io::Errno::from_raw_os_error(rustix::io::Errno::INVAL.raw_os_error()) + ); + #[cfg(not(windows))] + assert_eq!(rustix::io::Errno::INVAL.raw_os_error(), libc::EINVAL); + #[cfg(windows)] + assert_eq!( + rustix::io::Errno::INVAL.raw_os_error(), + windows_sys::Win32::Networking::WinSock::WSAEINVAL + ); +} -- cgit v1.2.3