Skip to content

Commit

Permalink
add test case for #337
Browse files Browse the repository at this point in the history
  • Loading branch information
mschubert committed Jan 13, 2025
1 parent c7a0800 commit 2a7e5e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/testthat/test-0-util.r
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,13 @@ test_that("no sci format when passing vectors", {

expect_equal(fill_template(tmpl, values), "1 and 1000000")
})

test_that("BiocGenerics changes format dispatch (#337)", {
# see: https://github.com/Bioconductor/BiocGenerics/blob/RELEASE_3_20/R/format.R
setGeneric("format")
format.list = base::format.AsIs

tmpl = "{{ var1 }} and {{ var2 }}"
values = c(var1=1, var2=100)
expect_equal(fill_template(tmpl, values), "1 and 100")
})

0 comments on commit 2a7e5e7

Please sign in to comment.