Skip to content

Commit

Permalink
Encoding characters removed from tests.Rraw. They fail the grep in CR…
Browse files Browse the repository at this point in the history
…AN_Release.cmd because they've failed on CRAN before. Reopened issue #469 and postponed it to v1.9.10 to resinstate these tests into DtNonAsciiTests package. Those characters cannot even be commented out because their presence in the file causes the CRAN issue. There probably is a better solution but I do not know it.
  • Loading branch information
mattdowle committed Nov 23, 2016
1 parent fe2d0c8 commit 670c476
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions inst/tests/tests.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -7332,37 +7332,6 @@ if ("package:xts" %in% search()) {
test(1589, all.equal(as.data.table(x), data.table(index = as.Date("2016-01-03"), V1 = 8), check.attributes=FALSE))
}

# Fix for all encoding issues, #66, #69, #469 and #1293
# #66
a = b = c("a","ä")
Encoding(a) = "unknown"
A = data.table(a, c=1:2, key="a")
B = data.table(b, d=2:1, key="b")
test(1590.1, A[B], cbind(A, d=2:1))

# #69
a = c("a", "ä", "ß", "z")
au = iconv(a, "UTF8", "latin1")
dta = data.table(a,b=1:4)
dtb <- data.table(a=au)
df = data.frame(a,b=1:4, stringsAsFactors=FALSE)
rownames(df) = df$a
test(1590.2, merge(dta, dtb, by="a", sort=FALSE),
setDT(merge(df, setDF(data.table(a=au)), by="a", sort=FALSE))
)

# #469
A = data.table(
kom = rep(101L,20),
eje = 1L:20L,
gad = rep("A.C. Meyers Vænge",20),
num = rep(c('1','10','11','11A'),times=c(10,1,2,7)),
enc = sample(c('unknown','UTF-8'), 20, replace=TRUE))
Encoding(A$gad) = A$enc
setkey(A, kom, gad, num)
test(1590.3, unique(A, by=c("kom","gad","num")),
as.data.table(A[!duplicated(paste(A$kom, A$gad, A$num))]))

# encoding issue in forder
x <- "fa\xE7ile"
Encoding(x)
Expand Down

0 comments on commit 670c476

Please sign in to comment.