diff options
| author | bors <bors@rust-lang.org> | 2025-02-09 12:54:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-09 12:54:26 +0000 |
| commit | a26e97be8826d408309fffbd8168362365719f50 (patch) | |
| tree | 6338d193659cbf549cbd09e6f0ced8a9feb1a5c3 /library/std/tests | |
| parent | 1ff21350fdc967393243227c88dddb5def8717b2 (diff) | |
| parent | 5ec56e5fbbbef22be73a469ec5467714391f8a67 (diff) | |
Auto merge of #136754 - Urgau:rollup-qlkhjqr, r=Urgau
Rollup of 5 pull requests Successful merges: - #134679 (Windows: remove readonly files) - #136213 (Allow Rust to use a number of libc filesystem calls) - #136530 (Implement `x perf` directly in bootstrap) - #136601 (Detect (non-raw) borrows of null ZST pointers in CheckNull) - #136659 (Pick the max DWARF version when LTO'ing modules with different versions ) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/tests')
| -rw-r--r-- | library/std/tests/win_delete_self.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/std/tests/win_delete_self.rs b/library/std/tests/win_delete_self.rs new file mode 100644 index 00000000000..1c3ce4d710c --- /dev/null +++ b/library/std/tests/win_delete_self.rs @@ -0,0 +1,8 @@ +#![cfg(windows)] + +/// Attempting to delete a running binary should return an error on Windows. +#[test] +fn win_delete_self() { + let path = std::env::current_exe().unwrap(); + assert!(std::fs::remove_file(path).is_err()); +} |
