Skip to content

Commit

Permalink
Add utf-8 test
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Apr 24, 2018
1 parent be567a9 commit 0856339
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/testthat/test-bq-download.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ test_that("can retrieve zero rows", {

# types -------------------------------------------------------------------

test_that("can read utf-8 strings", {
sql <- "SELECT '\U0001f603' as x"
tb <- bq_project_query(bq_test_project(), sql)
df <- bq_table_download(tb)
x <- df$x[[1]]

expect_equal(Encoding(x), "UTF-8")
expect_equal(x, "\U0001f603")
})

test_that("can convert date time types", {
sql <- "SELECT
datetime,
Expand Down

0 comments on commit 0856339

Please sign in to comment.