Closed karthik closed 10 years ago
This would be now easy to use with testthat
library(testthat)
# Test
# Set the working directory to the package root
data <- read.csv("local/km1314-waypoints.csv")
expect_false(test_utf8(data))
> expect_false(test_utf8(data))
Error: test_utf8(data) isn't false
With a verbose option
> expect_false(test_utf8(data, verbose = TRUE))
Now checking 3 columns...
UTF-8 characters detected in columns
2 3
Error: test_utf8(data, verbose = TRUE) isn't false
Arrrr>
ok gang (@hilaryparker) the UTF-8 check now works. See example at bottom of the script.