Skip to content

Commit 9f5c9f5

Browse files
More judicious #nocov, keep INTERNAL_STOP
1 parent 5a2d474 commit 9f5c9f5

File tree

4 files changed

+185
-174
lines changed

4 files changed

+185
-174
lines changed

R/fwrite.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ fwrite = function(x, file="", append=FALSE, quote="auto",
1717
encoding = "") {
1818
na = as.character(na[1L]) # fix for #1725
1919
if (length(encoding) != 1L || !encoding %chin% c("", "UTF-8", "native")) {
20-
stopf("Argument 'encoding' must be '', 'UTF-8' or 'native'.") # nocov
20+
stopf("Argument 'encoding' must be '', 'UTF-8' or 'native'.")
2121
}
2222
qmethod = match.arg(qmethod)
2323
compress = match.arg(compress)
2424
dateTimeAs = match.arg(dateTimeAs)
25-
dateTimeAs = chmatch(dateTimeAs, c("ISO", "squash", "epoch", "write.csv"))-1L
25+
dateTimeAs = chmatch(dateTimeAs, c("ISO", "squash", "epoch", "write.csv")) - 1L
2626
if (!is.null(logicalAsInt)) {
27-
stopf("logicalAsInt has been renamed logical01 for consistency with fread.") # nocov
27+
stopf("logicalAsInt has been renamed logical01 for consistency with fread.")
2828
}
2929
scipen = if (is.numeric(scipen)) as.integer(scipen) else 0L
3030
buffMB = as.integer(buffMB)

inst/tests/tests.Rraw

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10103,8 +10103,9 @@ test(1658.58, fwrite(DT), output='a,b\n1,0\\+1i\n2,-1-1i\n3,$')
1010310103
test(1658.59, fwrite(data.table(a=list('a')), verbose=TRUE),
1010410104
output='fields will be quoted if the field contains either sep.*sep2.*list column')
1010510105
test(1658.60, fwrite(data.table(r=as.raw(0))), error = "'raw' - not yet implemented")
10106-
## naLen is bigger than col width for coverage, only execute
10107-
fwrite(data.table(a="a"), na="VERY LONG MISSING VALUE STRING !", quote=FALSE, verbose=TRUE)
10106+
## naLen is bigger than col width
10107+
test(1658.61, fwrite(data.table(a="a"), na="VERY LONG MISSING VALUE STRING !", quote=FALSE, verbose=TRUE),
10108+
output="maxLineLen=66")
1010810109

1010910110
options(oldverbose)
1011010111
## End fwrite tests

0 commit comments

Comments
 (0)