path <- system.file("testdata", "three4", "scenario_0", package = "mm.reoptimise")
# pounds -> \u00A3
scenario <- create_scenario(path)
# dollars -> \u0024
scenario2 <- scenario
scenario2$curves_full <- scenario2$curves_full %>%
dplyr::mutate(alloc.unit_currency = "dollars")
# anything else -> ""
scenario3 <- scenario
scenario3$curves_full <- scenario3$curves_full %>%
dplyr::mutate(alloc.unit_currency = "not_a_currency")
test_that("function returns expected character", {
expect_equal("\u00A3", get_currency_symbol(scenario))
expect_equal("\u0024", get_currency_symbol(scenario2))
expect_equal("", get_currency_symbol(scenario3))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.