Skip to content

Commit

Permalink
new regression test re: column plonk in magrittr pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Apr 13, 2024
1 parent 7268eff commit 5a1f4f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inst/tests/other.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -722,3 +722,8 @@ if (FALSE) { # moved from tests.Rraw in #5517 and not yet back on; wasn't sure
}
}

if (loaded[["dplyr"]]) {
# regression test for converting character->list column in a magrittr (dplyr) pipe
DT = data.table(a = 1, b = 2, c = '[1, 2, 3, 4]', d = 4)
test(30, DT[, c := gsub('[][]', '', c) %>% strsplit(',', fixed = TRUE) %>% lapply(as.integer) %>% as.list]$c, list(1:4))
}

0 comments on commit 5a1f4f1

Please sign in to comment.