mirror of
https://github.com/rstudio/shiny.git
synced 2026-01-14 01:18:07 -05:00
17 lines
511 B
R
17 lines
511 B
R
context("UI")
|
|
|
|
test_that("selectInput options are properly escaped", {
|
|
si <- selectInput("quote", "Quote", list(
|
|
"\"Separators\"" = list(
|
|
"None" = "",
|
|
"Double quote" = "\"",
|
|
"Single quote" = "'"
|
|
)
|
|
))
|
|
|
|
si_str <- as.character(si)
|
|
expect_true(any(grepl("<option value=\""\">", si_str, fixed = TRUE)))
|
|
expect_true(any(grepl("<option value=\"'\">", si_str, fixed = TRUE)))
|
|
expect_true(any(grepl("<optgroup label=\""Separators"\">", si_str, fixed = TRUE)))
|
|
})
|