diff --git a/inst/tinytest/test-print.R b/inst/tinytest/test-print.R new file mode 100644 index 00000000..7fd9e6ff --- /dev/null +++ b/inst/tinytest/test-print.R @@ -0,0 +1,23 @@ +source("helpers.R") +using("tinysnapshot") + +tab <- tt(mtcars[1:4, 1:5]) + +options("tinytable_print_output" = "markdown") +void <- capture.output(x <- print(tab)) +expect_equivalent(x@output, "markdown") + +options("tinytable_print_output" = "latex") +void <- capture.output(x <- print(tab)) +expect_equivalent(x@output, "latex") + +options("tinytable_print_output" = "typst") +void <- capture.output(x <- print(tab)) +expect_equivalent(x@output, "typst") + +# avoid launching a viewer +# options("tinytable_print_output" = "html") +# void <- capture.output(x <- print(tab)) +# expect_equivalent(x@output, "html") + +options("tinytable_print_output" = NULL) \ No newline at end of file