Skip to content

Commit

Permalink
Update tests/testthat/test-l_table_parts.R
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsbock committed Aug 28, 2024
1 parent 7bec826 commit 051b475
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/l_table_parts.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A gt table contains the expected caption component

Code
.
as.character(as_latex(gt_tbl))
Output
[1] "\\begingroup\n\\fontsize{12.0pt}{14.4pt}\\selectfont\n\\begin{longtable}{rrrrrrrrrrr}\n\\caption{test caption} \\\\ \n\\toprule\nmpg & cyl & disp & hp & drat & wt & qsec & vs & am & gear & carb \\\\ \n\\midrule\\addlinespace[2.5pt]\n21.0 & 6 & 160 & 110 & 3.90 & 2.620 & 16.46 & 0 & 1 & 4 & 4 \\\\ \n21.0 & 6 & 160 & 110 & 3.90 & 2.875 & 17.02 & 0 & 1 & 4 & 4 \\\\ \n22.8 & 4 & 108 & 93 & 3.85 & 2.320 & 18.61 & 1 & 1 & 4 & 1 \\\\ \n21.4 & 6 & 258 & 110 & 3.08 & 3.215 & 19.44 & 1 & 0 & 3 & 1 \\\\ \n18.7 & 8 & 360 & 175 & 3.15 & 3.440 & 17.02 & 0 & 0 & 3 & 2 \\\\ \n\\bottomrule\n\\end{longtable}\n\\endgroup\n"

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-l_table_parts.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test_that("A gt table contains the expected caption component", {
# Expect a characteristic pattern
expect_match(
as_latex(tbl_latex) %>% as.character(),
"\\caption{test caption} \n\\fontsize",
"\\caption{test caption} \\\\ \n",
fixed = TRUE
)

Expand Down

0 comments on commit 051b475

Please sign in to comment.