Skip to content

Commit

Permalink
fix bug whre it was printing default round type at end of listings
Browse files Browse the repository at this point in the history
  • Loading branch information
gmbecker committed Feb 6, 2025
1 parent 5d0dcfc commit abdb16f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions R/rlistings_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ print.listing_df <- function(x,
col_gap = col_gap,
round_type = round_type,
...
),
round_type = round_type
)
)
}, error = function(e) {
if (nrow(x) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion man/listing_methods.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions tests/testthat/test-print.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ testthat::test_that("Listing print correctly", {
add_listing_col("ARM")

res <- strsplit(toString(matrix_form(lsting), hsep = "-"), "\\n")[[1]]
## regression
printout <- capture.output(print(lsting, hsep = "-"))
testthat::expect_false(any(grepl("iec", printout, fixed = TRUE)))
testthat::expect_identical(res, printout)

testthat::expect_snapshot(res)
})
Expand Down

0 comments on commit abdb16f

Please sign in to comment.