tests/test_files/block_11_Table.R

context("Table")

test_that("Table", {

    M <- matrix(1:4, 2)
    T <- Table(M, col_names=c("A", "B"))
     
    x <- pandocfilters:::test(list(T), "markdown")
    if ( get_pandoc_version() < 2 ) {
    	y <- paste("  A   B", "  --- ---", "  1   3", "  2   4", "", "", sep = "\n")
    } else {
    	y <- paste("  A   B", "  --- ---", "  1   3", "  2   4", sep = "\n")
    }
    
    expect_that(x, equals(y))

} )

Try the pandocfilters package in your browser

Any scripts or data that you put into this service are public.

pandocfilters documentation built on Aug. 12, 2022, 1:05 a.m.