From 4e29bbe0062a1d575889b3647fa619853749c4b3 Mon Sep 17 00:00:00 2001 From: Martin Morgan Date: Tue, 15 Oct 2024 10:25:37 -0400 Subject: [PATCH] update cache_info() to reflect cross-platform file.info output --- tests/testthat/tests-cache.R | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/testthat/tests-cache.R b/tests/testthat/tests-cache.R index fd4e357..e66303f 100644 --- a/tests/testthat/tests-cache.R +++ b/tests/testthat/tests-cache.R @@ -6,11 +6,10 @@ test_that("cache management works", { info <- cache_info() expect_s3_class(info, "data.frame") - expect_setequal( - names(info), - c("size", "isdir", "mode", "mtime", "ctime", "atime", "uid", - "gid", "uname", "grname") - ) + ## subset of column names common across platforms; see ?file.info + ## 'uname' not available in Windows <= R 4.4.1 + colnames <- c("size", "isdir", "mode", "mtime", "ctime", "atime") + expect_true(all(colnames %in% names(info))) }) test_that("'api_get' validates use_cache", {