Skip to content

Commit 883ab4f

Browse files
check !foreign before attempting string_match()
1 parent 5047017 commit 883ab4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/test.data.table.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,no
483483
out = paste(out, collapse="\n")
484484
output = paste(output, collapse="\n") # so that output= can be either a \n separated string, or a vector of strings.
485485
# it also happens to turn off the 'y' checking branch below
486-
if (length(output) && !string_match(output, out) && !foreign) {
486+
if (length(output) && !foreign && !string_match(output, out)) {
487487
# nocov start
488488
catf("Test %s did not produce correct output:\n", numStr)
489489
catf("Expected: <<%s>>\n", encodeString(output)) # \n printed as '\\n' so the two lines of output can be compared vertically

0 commit comments

Comments
 (0)