"multiple matchers requires all to match"
"informative feedback for components that are absent"
'request matching is not sensitive to escaping special characters'

request matching is not sensitive to escaping special characters

Error in `local_cassette("test", warn_on_empty = FALSE)`: `name` must not be the same as an existing cassette.

test_that("to_base64 and from_base64 are idempotent", {
test_that("from_base64 returns empty raw (v1 band-aid)", {
# Valid base64 strings should return TRUE
expect_true(is_base64("aGVsbG8gd29ybGQ=")) # "hello world" in base64
expect_true(is_base64("YWJjZGVm")) # "abcdef" in base64
expect_true(is_base64("dGVzdA==")) # "test" in base64
# Base64 with newlines should still work
# Valid multiline base64 (like from to_base64 with long content)
long_base64 <- paste0(strrep("ABCDEFGH", 10), "\n", strrep("IJKLMNOP", 10))
# Non-base64 content should return FALSE
expect_false(is_base64("hello world")) # Plain text
expect_false(is_base64("not base64!")) # Invalid characters
expect_false(is_base64("aGVsbG8===")) # Invalid padding (too many =)
expect_false(is_base64("aGVsbG8=world=")) # Padding in wrong position
expect_false(is_base64(c("YWJj", "ZGVm"))) # Vector with length > 1
text_base64 <- to_base64("This is a test string")
# Valid base64 that decodes to binary data
binary_data <- as.raw(c(0x00, 0xFF, 0x10, 0xAA, 0xBB, 0xCC))
test_that("encode_body and decode_body are idempotent", {
decode_body(list(string = "foo.txt", file = TRUE)),
decode_body(list(string = FALSE, file = FALSE)),
list(data = charToRaw("abcdef"), on_disk = FALSE)
test_that("warns about v1 bodies with a string that's base64", {
body <- list(string = to_base64("hello world"), file = FALSE)
expect_snapshot(out <- decode_body(body, preserve_bytes = TRUE))
# but doesn't warn if the string isn't base64
body <- list(string = "hello world", file = FALSE)
expect_no_warning(out <- decode_body(body, preserve_bytes = TRUE))
test_that("v1 bodies works for v2 vcr", {

"to_base64 and from_base64 are idempotent"
"from_base64 returns empty raw (v1 band-aid)"
"encode_body and decode_body are idempotent"
"warns about v1 bodies with a string that's base64"