context("create_data_xml")
test_that("use, first data, v2.4", {
id <- 12
expected <- c(
" <data",
paste0("id=\"", id, "\""),
"name=\"alignment\">"
)
created <- create_data_xml(id = id, beast2_version = "2.4")
expect_equal(expected, created)
})
test_that("use, first data, v2.5", {
id <- 12
expected <- paste0(" <data id=\"", id, "\" name=\"alignment\">")
created <- create_data_xml(id = id, beast2_version = "2.5")
expect_equal(expected, created)
})
test_that("use, first data, v2.6", {
created <- create_data_xml(id = "test_output_0", beast2_version = "2.6")
expected <- c(
" <data",
"id=\"test_output_0\"",
"spec=\"Alignment\"",
"name=\"alignment\">"
)
expect_equal(expected, created)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.