From 0e4be3f0bf66289be5cc0448b5b75549e69ccd05 Mon Sep 17 00:00:00 2001 From: chainsawriot Date: Sun, 12 Jan 2025 10:20:21 +0100 Subject: [PATCH] Fix #211 --- DESCRIPTION | 2 +- NEWS.md | 1 + .../test_may_make_read_ods_crash_v2.ods | Bin 0 -> 11379 bytes tests/testthat/test_read_ods.R | 4 ++++ 4 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tests/testdata/test_may_make_read_ods_crash_v2.ods diff --git a/DESCRIPTION b/DESCRIPTION index de3bdaf..963653d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,7 +25,7 @@ URL: https://docs.ropensci.org/readODS/, https://github.com/ropensci/readODS BugReports: https://github.com/ropensci/readODS/issues Imports: cellranger, - minty, + minty (>= 0.0.5), stringi, tibble, vctrs (>= 0.4.2), diff --git a/NEWS.md b/NEWS.md index 86bdd5c..c449a3c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ * Fix #207, trim off large or unused test files * Fix #209, require R >= 4.0.0 due to `cpp11` +* Fix #211, fix a bug (in minty) for parsing cells with only spaces # readODS 2.3.1 diff --git a/tests/testdata/test_may_make_read_ods_crash_v2.ods b/tests/testdata/test_may_make_read_ods_crash_v2.ods new file mode 100644 index 0000000000000000000000000000000000000000..f02beee325db53d7313bf28588bf51b001894f42 GIT binary patch literal 11379 zcmcI~1yo$y(k20dy9RtorLkRA!L4#XxcXto&?(V^d+;{KGmE_L+ zvu3K-S*yBNf8VZM`<&YQRF#}01SAF+7z`K~lsJjHj~PcGEf^Ts_v`5=Fmq#bAjruI zsB2|qW(?2;8CzP=*<0w-TI$*w+tONE0WI_`0e0p<3lOcXl?_l=-_{5S1j+q{^NHra zLinT!T3Q$w8`|0Y#%9Y%XKb!(2(+aWFb0|HTG`V58jSlBFv!x<%u3e+X!b9-7r(&i z>Dv4Y>Sv?bf^DN*@#v)mWDP!+y9Fhejn_IUtnNhe!HEXCiP!|d(vz{PG&$`T1RuUg_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L9i z#B_K%M7+AA64o`(3Xm}9pkpLP9_SCQJuO4MK6>w3J(zQotRNqMk~47pjQ6d3&jZ2E z3*Nb{FZ?-57?XY5=M!#}OuO5`q3&Gv?z6R1@pM)9S|ARb7{fq6)-M%#!T{PMHik)u zw}xhk728F|T!(JmLlGxpCo{(Ax9TJ6?`BIMLRoe+P?iL$z|EzK(lp*&M%+dEp&vIv4mK>M_RPDjGn^u zWhpI-o5O;24^ z36oDQ58N)du@0RW{L+Gd8TJ1J{xq?FOrZ1C=l@6Z{-*{1Be(q%t|au&74ZA`|83!Z>Ghwv?I-L0 zlL_E~Q<^9|J|oJx@02>mJb5}NgNX~v2o(vu_xyD&2=nP*(!xsoG~zNMbpI_1J*5f@ zqxdb_iBN>EID9&*7&8yD1+2?*$I&yPKO0zuAAfxBA32AuVZE9kh#@({FmU{kN>@6Q z?5v9aifpe`x7c-%vSrdVNUOc+O6LN4&RjK7JB=k=OvW$2p&dl?GL~4PI8qu-8ChI` z$_;G1X^@AgxB1LQsZNCn;%MK~o_+(JYL_AanKkz8 zW4xN)##lzFRwyw~V*oTwW^e;ZOZmn@Qi&Az=nOwDpM!p0CYA5y>wQpn1}pNuVzxGx zX>_46%)`#2$M{$ptbd=S%ZIPGf`{&M@8Te(MF~pkiS=A2JYL)g1BoB*za2a^f=Vn6&ci=$;XiPHE~|b|PX7>xr?3AFI!~48za#%#;rL#5 z{UKF|e<{NL9r))=`S$|I4*{Y*4f%UHeC1K6m-75`Tp&H0X>Xo!~g&Q literal 0 HcmV?d00001 diff --git a/tests/testthat/test_read_ods.R b/tests/testthat/test_read_ods.R index b917f6a..2d86555 100644 --- a/tests/testthat/test_read_ods.R +++ b/tests/testthat/test_read_ods.R @@ -165,3 +165,7 @@ test_that("Warns of empty sheet", { expect_warning(read_fods("../testdata/empty.fods")) }) }) + +test_that("minty v0.0.5 #211", { + expect_error(read_ods("../testdata/test_may_make_read_ods_crash_v2.ods", trim_ws = TRUE), NA) +})