Skip to content

Commit

Permalink
Pencilled in test from #2267. Added 'nocov' in C code to see if that …
Browse files Browse the repository at this point in the history
…works.
  • Loading branch information
mattdowle committed Feb 13, 2018
1 parent 4ac7e26 commit 7f48c74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions inst/tests/tests.Rraw
Expand Up @@ -11613,6 +11613,10 @@ fwrite(DT,f<-tempfile())
test(1873, fread(f), DT)
unlink(f)

# no good jump start, #2267
# At 35MB, the bad_fill.csv file size exceeds CRAN limit. Need to reduce its size.
# test(1874.1, fread(testDir("bad_fill.csv")), error="No good line could be found from jump point")
# test(1874.2, fread(testDir("bad_fill.csv"), fill=TRUE), error="No good line could be found from jump point")


##########################
Expand Down
10 changes: 5 additions & 5 deletions src/fread.c
Expand Up @@ -139,10 +139,10 @@ bool freadCleanup(void)
// may call freadCleanup(), thus resulting in an infinite loop.
#ifdef WIN32
if (!UnmapViewOfFile(mmp))
DTPRINT("System error %d unmapping view of file\n", GetLastError());
DTPRINT("System error %d unmapping view of file\n", GetLastError()); // nocov
#else
if (munmap(mmp, fileSize))
DTPRINT("System errno %d unmapping file: %s\n", errno, strerror(errno));
DTPRINT("System errno %d unmapping file: %s\n", errno, strerror(errno)); // nocov
#endif
mmp = NULL;
}
Expand Down Expand Up @@ -206,9 +206,9 @@ static char *typesAsString(int ncol) {
if (ncol<=100) {
for (; i<ncol; i++) str[i] = typeLetter[type[i]];
} else {
for (; i<80; i++) str[i] = typeLetter[type[i]];
str[i++]='.'; str[i++]='.'; str[i++]='.';
for (int j=ncol-10; j<ncol; j++) str[i++] = typeLetter[type[j]];
for (; i<80; i++) str[i] = typeLetter[type[i]]; // nocov
str[i++]='.'; str[i++]='.'; str[i++]='.'; // nocov
for (int j=ncol-10; j<ncol; j++) str[i++] = typeLetter[type[j]]; // nocov
}
str[i] = '\0';
return str;
Expand Down

0 comments on commit 7f48c74

Please sign in to comment.