We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
chdir
1 parent 0eed5e6 commit bcc7075Copy full SHA for bcc7075
tests/compile-fail/chdir_invalid_path.rs
@@ -0,0 +1,12 @@
1
+// ignore-windows: TODO the windows hook is not done yet
2
+// compile-flags: -Zmiri-disable-isolation
3
+
4
+extern {
5
+ pub fn chdir(dir: *const u8) -> i32;
6
+}
7
8
+fn main() {
9
+ let path = vec![0xc3u8, 0x28, 0];
10
+ // test that `chdir` errors with invalid utf-8 path
11
+ unsafe { chdir(path.as_ptr()) }; //~ ERROR is not a valid utf-8 string
12
0 commit comments