# Test case for valid response and parent_in = 'row' test_that("parser returns correct output for valid response and parent_in = 'row'", { resp <- ' John 25 Jane 30 ' expected_output <- data.frame(name = c("John", "Jane"), age = c("25", "30"), stringsAsFactors = FALSE) output <- parser(resp, parent_in = 'row') expect_equal(output, expected_output) }) # Test case for invalid IP address response test_that("parser throws an error for response with invalid IP address", { resp <- ' Invalid ip address ' expect_error(parser(resp)) })