Skip to content

Commit 78e2aa7

Browse files
committed
Add platform-specific conditions for readonly tests
- Skip --force and --remove-destination tests on Windows (options not implemented) - Skip --reflink tests on Windows (only supported on Linux and macOS) - Tests now run only on platforms where the features are available - Maintains comprehensive test coverage while respecting platform limitations
1 parent 1c28922 commit 78e2aa7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/by-util/test_cp.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4092,6 +4092,7 @@ fn test_cp_readonly_dest_regression() {
40924092
}
40934093

40944094
/// Test readonly destination behavior with --force flag (should succeed)
4095+
#[cfg(not(windows))]
40954096
#[test]
40964097
fn test_cp_readonly_dest_with_force() {
40974098
let ts = TestScenario::new(util_name!());
@@ -4111,6 +4112,7 @@ fn test_cp_readonly_dest_with_force() {
41114112
}
41124113

41134114
/// Test readonly destination behavior with --remove-destination flag (should succeed)
4115+
#[cfg(not(windows))]
41144116
#[test]
41154117
fn test_cp_readonly_dest_with_remove_destination() {
41164118
let ts = TestScenario::new(util_name!());
@@ -4130,6 +4132,7 @@ fn test_cp_readonly_dest_with_remove_destination() {
41304132
}
41314133

41324134
/// Test readonly destination behavior with reflink options
4135+
#[cfg(any(target_os = "linux", target_os = "macos"))]
41334136
#[test]
41344137
fn test_cp_readonly_dest_with_reflink() {
41354138
let ts = TestScenario::new(util_name!());

0 commit comments

Comments
 (0)