Closed florence-laflamme closed 8 months ago
Looks great, thanks!
Before I merge, you would just need to generate the actual snapshot files. To do this, make sure you have the testing packages installed:
install.packages(c("tinytest", "tinysnapshot"))
Then, run this in your R console, making sure that the working directory is the base (root) of the tinytable
repository:
library(tinytable)
library(tinytest)
run_test_file("inst/tinytest/test-markdown.R")
Finally, commit the new snapshot files to git, and push to Github.
Let me know if you have questions.
Excellent! I merged it.
Can you continue to add a bunch of them? LaTeX files should be verified first in a Quarto document with format: pdf
. And you can check HTML documents by using save_tt()
to save them to a file, and look at them in the browser.
Ideally, I'd like to test all features of all functions in all output formats. I know that's a lot, and it'll not reasonable of me to expect full coverage but whatever you manage to do will be great.
I note: to test HTML files we need to call the print_html()
function. See examples in test-html.R
Parfait, je vais travailler là-dessus!
Quick question:
I'm attempting to generate snapshots for tests in Latex using run_test_file("inst/tinytest/test-latex.R")
, but I get this error message :Error in b@table_string : no applicable method for
@applied to an object of class "tinytable"
. I think it's linked to the # Lazy style: group after style is respected
test.
Do I have to run another command, or download another package, for tests in Latex ?
Have you installed the very latest version of tinytable
from github? In R:
library(remotes)
install_github("vincentarelbundock/tinytable")
Then, restart R and try again.
Tests for bold columns, footnotes and missing value replacement in Markdown format.