about summary refs log tree commit diff
path: root/library/std/src/sys/stdio/windows/tests.rs
diff options
context:
space:
mode:
authorjoboet <jonasboettiger@icloud.com>2025-02-09 18:42:07 +0100
committerjoboet <jonasboettiger@icloud.com>2025-03-09 23:42:13 +0100
commitc52e0596c5ef1d68bf0f283342fdb05db63248f9 (patch)
tree028fcf26c4fd60709226ac4ddf1412f3d94148a7 /library/std/src/sys/stdio/windows/tests.rs
parent3ea711f17e3946ac3f4df11691584e2c56b4b0cf (diff)
downloadrust-c52e0596c5ef1d68bf0f283342fdb05db63248f9.tar.gz
rust-c52e0596c5ef1d68bf0f283342fdb05db63248f9.zip
std: move stdio to `sys`
As per #117276, this moves the platform definitions of `Stdout` and friends into `sys`. This PR also unifies the UNIX and Hermit implementations and moves the `__rust_print_err` function needed by libunwind on SGX into the dedicated module for such helper functions.
Diffstat (limited to 'library/std/src/sys/stdio/windows/tests.rs')
-rw-r--r--library/std/src/sys/stdio/windows/tests.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/std/src/sys/stdio/windows/tests.rs b/library/std/src/sys/stdio/windows/tests.rs
new file mode 100644
index 00000000000..1e53e0bee63
--- /dev/null
+++ b/library/std/src/sys/stdio/windows/tests.rs
@@ -0,0 +1,6 @@
+use super::utf16_to_utf8;
+
+#[test]
+fn zero_size_read() {
+    assert_eq!(utf16_to_utf8(&[], &mut []).unwrap(), 0);
+}