Skip to content

Commit b9aa14d

Browse files
Another attempt to increase coverage
1 parent aabe089 commit b9aa14d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

R/fwrite.R

Lines changed: 2 additions & 2 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'.")
20+
stopf("Argument 'encoding' must be '', 'UTF-8' or 'native'.") # nocov
2121
}
2222
qmethod = match.arg(qmethod)
2323
compress = match.arg(compress)
2424
dateTimeAs = match.arg(dateTimeAs)
2525
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.")
27+
stopf("logicalAsInt has been renamed logical01 for consistency with fread.") # nocov
2828
}
2929
scipen = if (is.numeric(scipen)) as.integer(scipen) else 0L
3030
buffMB = as.integer(buffMB)

inst/tests/tests.Rraw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10104,7 +10104,7 @@ 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")
1010610106
## naLen is bigger than col width for coverage
10107-
test(1658.61, fwrite(data.table(a="a"), na="VERY LONG MISSING VALUE STRING !", quote=FALSE), output="a\na")
10107+
test(1658.61, fwrite(data.table(a="a"), na="VERY LONG MISSING VALUE STRING !", quote=FALSE, verbose=TRUE), output="a\na")
1010810108

1010910109
options(oldverbose)
1011010110
## End fwrite tests

src/fwrite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ void fwriteMain(fwriteMainArgs args)
628628
// When NA is a non-empty string, then we must quote all string fields in case they contain the na string
629629
// na is recommended to be empty, though
630630
if (na[0]!='\0' && doQuote==INT8_MIN)
631-
doQuote = true;
631+
doQuote = true; // # nocov
632632

633633
qmethodEscape = args.qmethodEscape;
634634
squashDateTime = args.squashDateTime;

0 commit comments

Comments
 (0)