Skip to content

Commit ded4ab3

Browse files
committed
test.data.table: fix arguments to catf()
This ensures that interactive test.data.table() prints the test numbers while running (and avoids an error due to options(warn=2) in the middle of tests.Rraw). Also, # nocov the entire if (showProgress) branch.
1 parent deb31d9 commit ded4ab3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

R/test.data.table.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,11 @@ test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,no
383383
}
384384
assign("lasttime", proc.time()[3L], parent.frame(), inherits=TRUE) # after gc() to exclude gc() time from next test when memtest
385385
}, add=TRUE )
386-
if (showProgress) {
386+
if (showProgress) { # nocov start
387387
cat("\r") # notranslate: \r can't be in gettextf msg
388-
catf("Running test id", numStr, " ") # nocov.
389-
}
388+
catf("Running test id %s", numStr)
389+
cat(" ") # notranslate
390+
} # nocov end
390391
# See PR #4090 for comments about change here in Dec 2019.
391392
# If a segfault error occurs in future and we'd like to know after which test, then arrange for the
392393
# try(sys.source()) in test.data.table() to be run in a separate R process. That process could write out

0 commit comments

Comments
 (0)