Running ‘testthat.R’ [16s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(texPreview)
  > test_check("texPreview")
  ── 1. Failure: force an error: error message (@test-error.R#16)  ───────────────
  `texPreview::tex_preview(tex, marker = FALSE)` threw an error with unexpected message.
  Expected match: "Extra alignment tab"
  Actual message: " \n! LaTeX Error: File `/tmp/RtmpmPaGOm/working_dir/RtmpLBaOyy/tex_err/tex_temp.te\nx ' not found.\n\nType X to quit or <RETURN> to proceed,\nor enter new name. (Default extension: tex )\n\nEnter file name: \n! Emergency stop.\n<read *> \n \nl.17 ...king_dir/RtmpLBaOyy/tex_err/tex_temp.tex }\n ^^M \n!  ==> Fatal error occurred, no output PDF file produced!"
  
  ── 2. Error: (unknown) (@test-kable.R#85)  ─────────────────────────────────────
   
  ! LaTeX File `/tmp/RtmpmPaGOm/working_dir/RtmpLBaOyy/tex_temp.tex ' not 
  found.
  
  Type X to quit or <RETURN> to proceed,
  or enter new name. (Default extension: tex )
  
  Enter file name: 
  ! Emergency stop.
  <read *> 
   
  l.17 ...aGOm/working_dir/RtmpLBaOyy/tex_temp.tex }
   ^^M 
  !  ==> Fatal error occurred, no output PDF file produced!
  1: testthat::describe("input", {
         tex_input <- tex_preview(tex, returnType = "input")
         x <- as.kable(tex_input)
         it("value", {
             testthat::expect_true(grepl("begin", x))
         })
         it("class", {
             testthat::expect_true(inherits(x, "knitr_kable"))
         })
         it("attr", {
             testthat::expect_equal(attr(x, "format"), "latex")
         })
     }) at testthat/test-kable.R:85
  2: eval(substitute(code), describe_environment)
  3: eval(substitute(code), describe_environment)
  4: tex_preview(tex, returnType = "input") at testthat/test-kable.R:87
  5: tex_preview.character(tex, returnType = "input")
  6: tex_preview.default(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, 
         margin, imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, 
         svg_max, print.xtable.opts, opts.html, markers, ...)
  7: stop(parse_log(tex_log))
  
  ── 3. Error: (unknown) (@test-print.R#13)  ─────────────────────────────────────
   
  ! LaTeX File `/tmp/RtmpmPaGOm/working_dir/RtmpLBaOyy/tex/tex_temp.tex ' 
  not found.
  
  Type X to quit or <RETURN> to proceed,
  or enter new name. (Default extension: tex )
  
  Enter file name: 
  ! Emergency stop.
  <read *> 
   
  l.17 .../working_dir/RtmpLBaOyy/tex/tex_temp.tex }
   ^^M 
  !  ==> Fatal error occurred, no output PDF file produced!
  1: testthat::describe("print methods", {
         tex_output <- tex_preview(tex, returnType = "tex")
         input_output <- tex_preview(tex, returnType = "input")
         it("texpreview_tex", {
             testthat::expect_output(print(tex_output), regexp = "tabular")
         })
         it("texpreview_input", {
             testthat::expect_output(print(input_output), regexp = "tex_temp.tex")
         })
     }) at testthat/test-print.R:13
  2: eval(substitute(code), describe_environment)
  3: eval(substitute(code), describe_environment)
  4: tex_preview(tex, returnType = "tex") at testthat/test-print.R:15
  5: tex_preview.character(tex, returnType = "tex")
  6: tex_preview.default(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, 
         margin, imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, 
         svg_max, print.xtable.opts, opts.html, markers, ...)
  7: stop(parse_log(tex_log))
  
  ── 4. Error: (unknown) (@test-rmd.R#7)  ────────────────────────────────────────
  pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).
  1: rmarkdown::render("../assets/input/test_html.Rmd", output_dir = path, params = list(path = path), 
         quiet = TRUE) at testthat/test-rmd.R:7
  2: pandoc_available(required_pandoc, error = TRUE)
  3: stop(paste(msg, collapse = " "), call. = FALSE)
  
  ── 5. Error: (unknown) (@test-tex.R#12)  ───────────────────────────────────────
   
  ! LaTeX File `/tmp/RtmpmPaGOm/working_dir/RtmpLBaOyy/tex/tex_temp.tex ' 
  not found.
  
  Type X to quit or <RETURN> to proceed,
  or enter new name. (Default extension: tex )
  
  Enter file name: 
  ! Emergency stop.
  <read *> 
   
  l.17 .../working_dir/RtmpLBaOyy/tex/tex_temp.tex }
   ^^M 
  !  ==> Fatal error occurred, no output PDF file produced!
  1: testthat::describe("porting to tex", {
         x <- texPreview::tex_preview(obj = xtable::xtable(head(iris, 10)))
         it("files generated", {
             testthat::expect_equal(length(list.files(path)), 2)
         })
         it("class of output", {
             testthat::expect_is(x, "texpreview_tex")
         })
     }) at testthat/test-tex.R:12
  2: eval(substitute(code), describe_environment)
  3: eval(substitute(code), describe_environment)
  4: texPreview::tex_preview(obj = xtable::xtable(head(iris, 10))) at testthat/test-tex.R:14
  5: tex_preview.xtable(obj = xtable::xtable(head(iris, 10)))
  6: tex_preview(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, margin, 
         imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, svg_max, 
         print.xtable.opts, opts.html, markers, ...)
  7: tex_preview.character(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, 
         margin, imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, 
         svg_max, print.xtable.opts, opts.html, markers, ...)
  8: tex_preview.default(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, 
         margin, imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, 
         svg_max, print.xtable.opts, opts.html, markers, ...)
  9: stop(parse_log(tex_log))
  
  ── 6. Error: viewer output: validate viewer (@test-viewer.R#20)  ───────────────
   
  ! LaTeX File `/tmp/RtmpmPaGOm/working_dir/RtmpLBaOyy/rmd/test_viewer.tex
   ' not found.
  
  Type X to quit or <RETURN> to proceed,
  or enter new name. (Default extension: tex )
  
  Enter file name: 
  ! Emergency stop.
  <read *> 
   
  l.17 ...rking_dir/RtmpLBaOyy/rmd/test_viewer.tex }
   ^^M 
  !  ==> Fatal error occurred, no output PDF file produced!
  1: testthat::expect_output(mtcars %>% utils::head(5) %>% knitr::kable(format = "latex", 
         caption = "my table", label = "tbl1") %>% tex_preview(returnType = "viewer", 
         stem = "test_viewer"), regexp = "index.html") at testthat/test-viewer.R:20
  2: quasi_capture(enquo(object), label, capture_output, width = width)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: capture_output_lines(code, print, width = width)
  5: eval_with_output(code, print = print, width = width)
  6: withr::with_output_sink(temp, withVisible(code))
  7: force(code)
  8: withVisible(code)
  9: eval_bare(get_expr(.quo), get_env(.quo))
  10: mtcars %>% utils::head(5) %>% knitr::kable(format = "latex", caption = "my table", 
         label = "tbl1") %>% tex_preview(returnType = "viewer", stem = "test_viewer")
  ...
  14: `_fseq`(`_lhs`)
  15: freduce(value, `_function_list`)
  16: withVisible(function_list[[k]](value))
  17: function_list[[k]](value)
  18: tex_preview(., returnType = "viewer", stem = "test_viewer")
  19: tex_preview.knitr_kable(., returnType = "viewer", stem = "test_viewer")
  20: tex_preview(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, margin, 
         imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, svg_max, 
         print.xtable.opts, opts.html, markers, ...)
  21: tex_preview.character(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, 
         margin, imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, 
         svg_max, print.xtable.opts, opts.html, markers, ...)
  22: tex_preview.default(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, 
         margin, imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, 
         svg_max, print.xtable.opts, opts.html, markers, ...)
  23: stop(parse_log(tex_log))
  
  ── 7. Error: shiny output: validate shiny output (@test-viewer.R#36)  ──────────
   
  ! LaTeX File `/tmp/RtmpmPaGOm/working_dir/RtmpLBaOyy/rmd/test_shiny.tex 
  ' not found.
  
  Type X to quit or <RETURN> to proceed,
  or enter new name. (Default extension: tex )
  
  Enter file name: 
  ! Emergency stop.
  <read *> 
   
  l.17 ...orking_dir/RtmpLBaOyy/rmd/test_shiny.tex }
   ^^M 
  !  ==> Fatal error occurred, no output PDF file produced!
  1: testthat::expect_null(mtcars %>% utils::head(5) %>% knitr::kable(format = "latex", 
         caption = "my table", label = "tbl1") %>% tex_preview(returnType = "shiny", stem = "test_shiny")) at testthat/test-viewer.R:36
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: mtcars %>% utils::head(5) %>% knitr::kable(format = "latex", caption = "my table", 
         label = "tbl1") %>% tex_preview(returnType = "shiny", stem = "test_shiny")
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: tex_preview(., returnType = "shiny", stem = "test_shiny")
  13: tex_preview.knitr_kable(., returnType = "shiny", stem = "test_shiny")
  14: tex_preview(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, margin, 
         imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, svg_max, 
         print.xtable.opts, opts.html, markers, ...)
  15: tex_preview.character(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, 
         margin, imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, 
         svg_max, print.xtable.opts, opts.html, markers, ...)
  16: tex_preview.default(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, 
         margin, imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, 
         svg_max, print.xtable.opts, opts.html, markers, ...)
  17: stop(parse_log(tex_log))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 18 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 7 ]
  1. Failure: force an error: error message (@test-error.R#16) 
  2. Error: (unknown) (@test-kable.R#85) 
  3. Error: (unknown) (@test-print.R#13) 
  4. Error: (unknown) (@test-rmd.R#7) 
  5. Error: (unknown) (@test-tex.R#12) 
  6. Error: viewer output: validate viewer (@test-viewer.R#20) 
  7. Error: shiny output: validate shiny output (@test-viewer.R#36) 
  
  Error: testthat unit tests failed
  Execution halted