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