tests/test_files/inline_08_Quoted.R

context("Quoted")

test_that("Quoted", {

    ## Test Quoted with Header
    x <- pandocfilters:::test(list(Header(list(Quoted(list(Str("Hello R!")))))))
    expect_that(x, equals("<h1>“Hello R!”</h1>"))
    x <- pandocfilters:::test(list(Header(list(Quoted(Str("Hello R!"))))))
    expect_that(x, equals("<h1>“Hello R!”</h1>"))
    x <- pandocfilters:::test(list(Header(Quoted(Str("Hello R!")))))
    expect_that(x, equals("<h1>“Hello R!”</h1>"))   

    ## Test Quoted with Plain
    x <- pandocfilters:::test(list(Plain(list(Quoted(list(Str("Hello R!")))))))
    expect_that(x, equals("“Hello R!”"))
    x <- pandocfilters:::test(list(Plain(list(Quoted(Str("Hello R!"))))))
    expect_that(x, equals("“Hello R!”"))
    x <- pandocfilters:::test(list(Plain(Quoted(Str("Hello R!")))))
    expect_that(x, equals("“Hello R!”"))
    
} )

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.