# Generated by roxytest: Do not edit by hand!
# File R/import.R: @tests
test_that("Function read_gedcom() @ L29", {
expect_error(read_gedcom("my_family.txt"))
expect_snapshot_value(
read_gedcom(system.file("extdata", "555SAMPLE.GED", package = "tidyged.io")),
"json2")
expect_snapshot_value(
read_gedcom(system.file("extdata", "555SAMPLE16BE.GED", package = "tidyged.io")),
"json2")
expect_snapshot_value(
read_gedcom(system.file("extdata", "555SAMPLE16LE.GED", package = "tidyged.io")),
"json2")
expect_snapshot_value(
read_gedcom(system.file("extdata", "MINIMAL555.GED", package = "tidyged.io")),
"json2")
})
test_that("Function read_gedcom_encoding() @ L81", {
expect_equal(
read_gedcom_encoding(system.file("extdata", "555SAMPLE.GED", package = "tidyged.io")),
"UTF-8")
expect_equal(
read_gedcom_encoding(system.file("extdata", "555SAMPLE16BE.GED", package = "tidyged.io")),
"UTF-16BE")
expect_equal(
read_gedcom_encoding(system.file("extdata", "555SAMPLE16LE.GED", package = "tidyged.io")),
"UTF-16LE")
})
test_that("Function check_line_lengths() @ L106", {
expect_error(check_line_lengths(c("the", "quick", "brown", "fox"), 4))
expect_equal(check_line_lengths(c("the", "quick", "brown", "fox"), 5),
c("the", "quick", "brown", "fox"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.