test_that("Cell ranger related problem #57", { ods_3r <- read_ods('../testdata/cellranger_issue57.ods', sheet = 1, range = "A1:B4", col_names = TRUE) ods_2r <- read_ods('../testdata/cellranger_issue57.ods', sheet = 1, range = "A1:B3", col_names = TRUE) ods_a2_1r <- read_ods('../testdata/cellranger_issue57.ods', sheet = 1, range = "A2:B3", col_names = TRUE) ods_a2_1r_df <- read_ods('../testdata/cellranger_issue57.ods', sheet = 1, range = "A2:B3", col_names = TRUE, as_tibble = FALSE) ods_a1_noheader_3r <- read_ods('../testdata/cellranger_issue57.ods', sheet = 1, range = "A1:B3", col_names = FALSE) expect_equal(nrow(ods_3r), 3) expect_equal(nrow(ods_2r), 2) expect_equal(nrow(ods_2r), 2) expect_equal(nrow(ods_a2_1r), 1) expect_equal(nrow(ods_a1_noheader_3r), 3) expect_equal(ods_3r[[3,1]], 3) expect_equal(ods_2r[[2,1]], 2) ## single row expect_equal(colnames(ods_a2_1r)[1], "1") expect_equal(colnames(ods_a2_1r_df)[1], "1") })