Skip to content

Commit

Permalink
fwrite 3rd attempt for windows #580
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdowle committed Apr 13, 2016
1 parent 24f945c commit eb9bb60
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion inst/tests/tests.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -8586,8 +8586,13 @@ local({
'"a";"b"\n"foo";"ba""r"\n')

# changing eol
fwrite_test(1658.5, function(f) { fwrite(data.table(a="foo", b="bar"), f, eol="\r\n") },
if (.Platform$OS.type=="linux") {
# can change eol on windows too; the only reason for running this test on linux only
# is that inside fwrite_test() on windows it gsub's '\r\n' in the result to '\n'
# for the other tests which have a fixed \n endings to compare to
fwrite_test(1658.5, function(f) { fwrite(data.table(a="foo", b="bar"), f, eol="\r\n") },
'"a","b"\r\n"foo","bar"\r\n')
}

# changing NA
fwrite_test(1658.51, function(f) { fwrite(data.table(a=c("foo", NA), b=c(1, NA)), f, na="NA") },
Expand Down

0 comments on commit eb9bb60

Please sign in to comment.