# WARNING - Generated by {fusen} from dev/flat_kwb_simulate_inflow.Rmd: do not edit by hand # nolint: line_length_linter. test_that("hsQuoteChr works correctly with single quotes", { expect_equal(hsQuoteChr("Hello", qchar = "'"), "'Hello'") expect_equal(hsQuoteChr("He said, 'Hello!'", qchar = "'", escapeMethod = "backslash"), "'He said, 'Hello!''") expect_equal(hsQuoteChr("He said, 'Hello!'", qchar = "'", escapeMethod = "double"), "'He said, ''Hello!'''") }) test_that("hsQuoteChr works correctly with double quotes", { expect_equal(hsQuoteChr("Hello", qchar = "\""), "\"Hello\"") expect_equal(hsQuoteChr("He said, \"Hello!\"", qchar = "\"", escapeMethod = "backslash"), "\"He said, \"Hello!\"\"") expect_equal(hsQuoteChr("He said, \"Hello!\"", qchar = "\"", escapeMethod = "double"), "\"He said, \"\"Hello!\"\"\"") }) test_that("hsQuoteChr works correctly with lists", { expect_equal(hsQuoteChr(list("Hello", "world"), qchar = "'"), c("'Hello'", "'world'")) expect_equal(hsQuoteChr(list("He said, 'Hello!'"), qchar = "'", escapeMethod = "backslash"), "'He said, ''Hello!'''") expect_equal(hsQuoteChr(list(), qchar = "'"), NULL) }) test_that("hsQuoteChr handles non-character inputs", { expect_equal(hsQuoteChr(123, qchar = "'"), 123) expect_equal(hsQuoteChr(c(TRUE, FALSE), qchar = "'"), c(TRUE, FALSE)) })