Running ‘testthat.R’ [15s/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/Rtmpu5ai71/tex/tex_temp.tex ' 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 \\input{ /tmp/Rtmpu5ai71/tex/tex_temp.tex }\n ^^M \n!  ==> Fatal error occurred, no output PDF file produced!"
  
  ── 2. Error: (unknown) (@test-kable.R#85)  ─────────────────────────────────────
   
  ! LaTeX File `/tmp/Rtmpu5ai71/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 \input{ /tmp/Rtmpu5ai71/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/Rtmpu5ai71/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 \input{ /tmp/Rtmpu5ai71/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-tex.R#12)  ───────────────────────────────────────
   
  ! LaTeX File `/tmp/Rtmpu5ai71/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 \input{ /tmp/Rtmpu5ai71/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))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 18 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 4 ]
  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-tex.R#12) 
  
  Error: testthat unit tests failed
  Execution halted