Skip to content

Commit

Permalink
test-latex
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Jan 16, 2024
1 parent e6840cf commit 57f4ab0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ help: ## Display this help screen
@echo -e "\033[1mAvailable commands:\033[0m\n"
@grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' | sort

check: ## check package
check: ## check
Rscript -e "devtools::document();devtools::check()"

install: ## install package
test: ## test
Rscript -e "devtools::install();library(tinytable);tinytest::run_test_dir()"

install: ## install
Rscript -e "devtools::document();devtools::install()"

website: ## render vignettes and website
Expand Down
3 changes: 3 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ meta <- function(x, get, set) {
# some rows may be added, which changes how the style is applied
eval_style <- function(x) {
out <- x

ls <- meta(x)$lazy_style

for (lazy_style in meta(x)$lazy_style) {
lazy_style[["x"]] <- out
out <- eval(lazy_style)
Expand Down
6 changes: 5 additions & 1 deletion inst/tinytest/test-markdown.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
source("helpers.R")
using("tinysnapshot")

# markdown without labels
k = iris[1:10,]
colnames(k) <- NULL
expect_snapshot_print(tt(k), "markdown-nocolnames")
expect_snapshot_print(
tt(k, output = "markdown"),
label = "markdown-nocolnames")

0 comments on commit 57f4ab0

Please sign in to comment.