Running 'test-all.R' [191s]
Running the tests in 'tests/test-all.R' failed.
Complete output:
  > 
  > library(pandocfilters)
  
  Attaching package: 'pandocfilters'
  
  The following object is masked from 'package:stats':
  
      filter
  
  The following object is masked from 'package:methods':
  
      Math
  
  > 
  > find_tests <- function(pkg) {
  +     test_files_path <- file.path(getwd(), "test_files")
  +     if ( dir.exists(test_files_path) ) test_files_path else stop("couldn't find tests")
  + }
  > 
  > ## Remove testthat since it add too much dependencies!
  > ## I use anyhow only expact_that equals
  > context <- function(msg) logger <<- c(logger, list(structure(msg, class = "context")))
  > header <- function(msg) logger <<- c(logger, list(structure(msg, class = "header")))
  > 
  > equals <- function(x) x
  > expect_that <- function(x, y) {
  +     z <- all.equal(x, y)
  +     if ( !isTRUE(z) ) {
  +         msg <- sprintf("%s in `%s`", z, deparse(sys.call()))
  +         logger <<- c(logger, list(structure(msg, class = "complaint")))
  +     }
  + }
  > 
  > is.context <- function(x) inherits(x, "context")
  > is.header <- function(x) inherits(x, "header")
  > is.complaint <- function(x) inherits(x, "complaint")
  > 
  > build_report <- function(logger) {
  +     report <- character()
  +     count_errors <- 0L
  +     for (i in seq_along(logger)) {
  +         msg <- ""
  +         loge <- logger[[i]]
  +         next_loge <- if ( i < length(logger) ) logger[[i + 1]] else loge
  + 
  +         if ( is.header(loge) ) {
  +             report <- c(report, as.character(loge))
  +         } else if ( is.context(loge) ) {
  +             if ( is.context(next_loge) ) {
  +                 ## report <- c(report, sprintf("  %s: OK!", as.character(loge)))
  +             } else {
  +                 count_errors <- count_errors + 1L
  +                 report <- c(report, sprintf("  %s: ERROR!", as.character(loge)))
  +             }
  +         } else {
  +             report <- c(report, sprintf("    %s", as.character(loge)))
  +         }
  +     }
  +     if ( count_errors == 0L ) {
  +         report <- c(report, "  No Errors occured!")
  +     }
  +     report
  + }
  > 
  > ## for interactive tests I assume that tests is the working directory
  > test_pkg <- function(pkg) {
  +     test_files_path <- find_tests(pkg)
  +     test_files <- dir(test_files_path, full.names = TRUE)
  +     for (i in seq_along(test_files)) {
  +         source(test_files[i], local = TRUE)
  +     }
  + }
  > 
  > test_that <- function(description, expression) {
  +     local(expression)
  + }
  > 
  > print(getwd())
  [1] "d:/Rcompile/CRANpkg/local/4.4/pandocfilters.Rcheck/tests"
  > print(system.file(package = "pandocfilters"))
  [1] "D:/RCompile/CRANpkg/lib/4.4/pandocfilters"
  > 
  > ## to test multiple versions the path to this versions can be
  > ## set in the system variable "PANDOC_PATHS"
  > ## e.g. one can put 
  > ## Sys.setenv(PANDOC_PATHS = 
  > ##   paste(sprintf("/home/florian/bin/pandoc/pandoc_%i/bin/pandoc", 
  > ##                 c(116, 203, 211)), collapse=",")) 
  > ## into the .Rprofile file.
  > if ( pandocfilters:::is.pandoc_installed() ) {
  +     TEST_ALL_VERSIONS <- TRUE ## just to speed up things when developing
  +     if ( nchar(Sys.getenv("PANDOC_PATHS")) & TEST_ALL_VERSIONS ) {
  +         pandoc_paths <- unlist(strsplit(Sys.getenv("PANDOC_PATHS"), ",", fixed = TRUE))
  +         logger <- list()
  +         reports <- list()
  +         for (i in seq_along(pandoc_paths)) {
  +             set_pandoc_path(pandoc_paths[i])
  +             header(sprintf("\nTest pandoc version: %s\n", as.character(get_pandoc_version())))
  +             test_pkg("pandocfilters")
  +             reports[[i]] <- build_report(logger)
  +             logger <- list()
  +         }
  +         writeLines(do.call(c, reports))
  +     } else {
  +         logger <- list()
  +         header(sprintf("\nTest pandoc version: %s\n", as.character(get_pandoc_version())))
  +         test_pkg("pandocfilters")
  +         writeLines(build_report(logger))
  +     }
  + } else {
  +     writeLines("\nPandoc is not registered in the path so the tests are skipped!\n")
  + }
  
  Test pandoc version: 3.1
  
    Plain: ERROR!
      1 string mismatch in `expect_that(x, equals("Hello R!"))`
      1 string mismatch in `expect_that(x, equals("Hello R!"))`
    Para: ERROR!
      1 string mismatch in `expect_that(x, equals("<p>Hello R!</p>"))`
      1 string mismatch in `expect_that(x, equals("<p>Hello R!</p>"))`
    CodeBlock: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
    BlockQuote: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
    BlockQuote: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
    OrderedList: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
    BulletList: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
    DefinitionList: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
    Header: ERROR!
      1 string mismatch in `expect_that(x, equals("<h1>Hello R!</h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1>Hello R!</h1>"))`
    HorizontalRule: ERROR!
      1 string mismatch in `expect_that(x, equals("<hr />"))`
    Table: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
    Div: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
    Null: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
    Str: ERROR!
      1 string mismatch in `expect_that(x, equals("<h1>Hello R!</h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1>Hello R!</h1>"))`
      1 string mismatch in `expect_that(x, equals("Hello R!"))`
      1 string mismatch in `expect_that(x, equals("Hello R!"))`
    Emph: ERROR!
      1 string mismatch in `expect_that(x, equals("<h1><em>Hello R!</em></h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1><em>Hello R!</em></h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1><em>Hello R!</em></h1>"))`
      1 string mismatch in `expect_that(x, equals("<em>Hello R!</em>"))`
      1 string mismatch in `expect_that(x, equals("<em>Hello R!</em>"))`
      1 string mismatch in `expect_that(x, equals("<em>Hello R!</em>"))`
    Strong: ERROR!
      1 string mismatch in `expect_that(x, equals("<h1><strong>Hello R!</strong></h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1><strong>Hello R!</strong></h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1><strong>Hello R!</strong></h1>"))`
      1 string mismatch in `expect_that(x, equals("<strong>Hello R!</strong>"))`
      1 string mismatch in `expect_that(x, equals("<strong>Hello R!</strong>"))`
      1 string mismatch in `expect_that(x, equals("<strong>Hello R!</strong>"))`
    Strikeout: ERROR!
      1 string mismatch in `expect_that(x, equals("<h1><del>Hello R!</del></h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1><del>Hello R!</del></h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1><del>Hello R!</del></h1>"))`
      1 string mismatch in `expect_that(x, equals("<del>Hello R!</del>"))`
      1 string mismatch in `expect_that(x, equals("<del>Hello R!</del>"))`
      1 string mismatch in `expect_that(x, equals("<del>Hello R!</del>"))`
    Superscript: ERROR!
      1 string mismatch in `expect_that(x, equals("<h1><sup>Hello R!</sup></h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1><sup>Hello R!</sup></h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1><sup>Hello R!</sup></h1>"))`
      1 string mismatch in `expect_that(x, equals("<sup>Hello R!</sup>"))`
      1 string mismatch in `expect_that(x, equals("<sup>Hello R!</sup>"))`
      1 string mismatch in `expect_that(x, equals("<sup>Hello R!</sup>"))`
    Subscript: ERROR!
      1 string mismatch in `expect_that(x, equals("<h1><sub>Hello R!</sub></h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1><sub>Hello R!</sub></h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1><sub>Hello R!</sub></h1>"))`
      1 string mismatch in `expect_that(x, equals("<sub>Hello R!</sub>"))`
      1 string mismatch in `expect_that(x, equals("<sub>Hello R!</sub>"))`
      1 string mismatch in `expect_that(x, equals("<sub>Hello R!</sub>"))`
    SmallCaps: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
    Quoted: ERROR!
      1 string mismatch in `expect_that(x, equals("<h1>“Hello R!”</h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1>“Hello R!”</h1>"))`
      1 string mismatch in `expect_that(x, equals("<h1>“Hello R!”</h1>"))`
      1 string mismatch in `expect_that(x, equals("“Hello R!”"))`
      1 string mismatch in `expect_that(x, equals("“Hello R!”"))`
      1 string mismatch in `expect_that(x, equals("“Hello R!”"))`
    Cite: ERROR!
      1 string mismatch in `expect_that(x, equals("@Citation_ID_1 [Suffix\\_1]\n=========================="))`
      1 string mismatch in `expect_that(x, equals("@Citation_ID_1 [Suffix\\_1]\n=========================="))`
      1 string mismatch in `expect_that(x, equals("@Citation_ID_1 [Suffix\\_1]\n=========================="))`
      1 string mismatch in `expect_that(x, equals("@Citation_ID_1 [Suffix\\_1]\n=========================="))`
      1 string mismatch in `expect_that(x, equals("@Citation_ID_1 [Suffix\\_1]"))`
      1 string mismatch in `expect_that(x, equals("@Citation_ID_1 [Suffix\\_1]"))`
      1 string mismatch in `expect_that(x, equals("@Citation_ID_1 [Suffix\\_1]"))`
      1 string mismatch in `expect_that(x, equals("@Citation_ID_1 [Suffix\\_1]"))`
    Str: ERROR!
      1 string mismatch in `expect_that(x, equals(paste(y, collapse = "\n")))`
      1 string mismatch in `expect_that(x, equals(paste(y, collapse = "\n")))`
      1 string mismatch in `expect_that(x, equals(y[1]))`
      1 string mismatch in `expect_that(x, equals(y[1]))`
    Space: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
    SoftBreak: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
    LineBreak: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(trimws(x), equals(y))`
      1 string mismatch in `expect_that(trimws(x), equals(y))`
    Math: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
    RawInline: ERROR!
      1 string mismatch in `expect_that(x, equals(paste(y, collapse = "\n")))`
      1 string mismatch in `expect_that(x, equals(paste(y, collapse = "\n")))`
      1 string mismatch in `expect_that(x, equals(y[1]))`
      1 string mismatch in `expect_that(x, equals(y[1]))`
    Link: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
    Image: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
    Note: ERROR!
      1 string mismatch in `expect_that(pandocfilters:::test(list(Header(Note(list(block))))), `
      1 string mismatch in `    equals(y))`
      1 string mismatch in `expect_that(pandocfilters:::test(list(Header(Note(block)))), `
      1 string mismatch in `    equals(y))`
      1 string mismatch in `expect_that(pandocfilters:::test(list(Plain(Note(list(block))))), `
      1 string mismatch in `    equals(y))`
      1 string mismatch in `expect_that(pandocfilters:::test(list(Plain(Note(block)))), equals(y))`
    Span: ERROR!
      1 string mismatch in `expect_that(x, equals(y))`
      1 string mismatch in `expect_that(x, equals(y))`
  There were 50 or more warnings (use warnings() to see the first 50)
  > 
  > proc.time()
     user  system elapsed 
     0.32    0.40   25.06