1library(pystr) 2context("pystr_islower") 3 4test_that("it returns false if there's capitals", { 5 expect_false(pystr_islower("abC")) 6}) 7 8test_that("it returns true if there's no capitals", { 9 expect_true(pystr_islower("abc")) 10}) 11 12test_that("the presence of punctuation and numerics doesn't matter", { 13 expect_true(pystr_islower("abc123!")) 14}) 15 16test_that("it returns false if there are no cased characters", { 17 expect_false(pystr_islower("?!.")) 18}) 19 20test_that("it handles vectors", { 21 expect_equal(pystr_islower(c("?!.", "abc")), c(FALSE, TRUE)) 22}) 23 24test_that("it handles NAs", { 25 expect_equal(pystr_islower(c("?!.", "abc", NA)), c(FALSE, TRUE, NA)) 26}) 27