Skip to content

Commit d58777d

Browse files
authored
Drop test of Latin1 encoding of DESCRIPTION (#3009)
As CRAN is phasing out support
1 parent 5135402 commit d58777d

1 file changed

Lines changed: 0 additions & 40 deletions

File tree

tests/testthat/test-build-home-authors.R

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -180,46 +180,6 @@ test_that("can handle UTF-8 encoding (#416, #493)", {
180180
expect_s3_class(cit, "citation")
181181
})
182182

183-
test_that("can handle latin1 encoding (#689)", {
184-
pkg <- local_pkgdown_site(
185-
desc = list(
186-
Title = "A søphîstiçated påckagé",
187-
Date = "2018-02-02",
188-
Encoding = "latin1"
189-
)
190-
)
191-
meta <- create_citation_meta(pkg$src_path)
192-
expect_equal(meta$Title, "A søphîstiçated påckagé")
193-
expect_equal(Encoding(meta$Title), "UTF-8")
194-
195-
pkg <- pkg_add_file(
196-
pkg,
197-
"inst/CITATION",
198-
c(
199-
'citEntry(',
200-
' entry = "Article",',
201-
' title="Title: é",',
202-
' author="Author: é",',
203-
' journal="Journal é",',
204-
' year="2017",',
205-
' textVersion = "é"',
206-
')'
207-
)
208-
)
209-
cit_path <- path(pkg$src_path, "inst/CITATION")
210-
citation <- readLines(cit_path) # nolint
211-
con <- file(cit_path, open = "w+", encoding = "native.enc")
212-
withr::defer(close(con))
213-
base::writeLines(iconv(citation, to = "latin1"), con, useBytes = TRUE) # nolint
214-
215-
cit <- read_citation(pkg$src_path)
216-
expect_s3_class(cit, "citation")
217-
218-
pkg <- pkg_add_file(pkg, "inst/CITATION", "citation(auto = meta)")
219-
cit <- read_citation(pkg$src_path)
220-
expect_s3_class(cit, "citation")
221-
})
222-
223183
test_that("source link is added to citation page", {
224184
# Work around bug in utils::citation()
225185
local_options(warnPartialMatchDollar = FALSE)

0 commit comments

Comments
 (0)