1library(pystr) 2context("pystr_istitle") 3 4test_that("it returns true if the string is titled", { 5 expect_true(pystr_istitle("Hello World")) 6}) 7 8test_that("it returns false if the string is not titled", { 9 expect_false(pystr_istitle("hello world")) 10}) 11 12test_that("it works with a character vector", { 13 expect_equal(pystr_istitle(c("Hello World", "hello world")), c(TRUE, FALSE)) 14}) 15