Skip to content

Commit 74ee80e

Browse files
bschilderclaude
andcommitted
Fix set_permissions test on Windows (no execute bit support)
Windows does not support the execute permission bit, so chmod 777 results in mode 666. Allow both values in the test assertion. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 284e149 commit 74ee80e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/testthat/test-set_permissions.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ test_that("set_permissions sets permissions on a temp file", {
2828
set_permissions(f, verbose = FALSE)
2929

3030
info_after <- file.info(f)
31-
## After set_permissions the file should have 777
32-
testthat::expect_equal(as.character(info_after$mode), "777")
31+
## After set_permissions the file should have 777 (Unix) or 666 (Windows, no execute bit)
32+
testthat::expect_true(as.character(info_after$mode) %in% c("777", "666"))
3333
})
3434

3535
test_that("set_permissions works with is_folder=TRUE on a temp directory", {

0 commit comments

Comments
 (0)