Repository navigation
fread(yaml=TRUE) works when text=/input= is a single string with newlines - #7938
AnKiT-GaRG2 wants to merge 3 commits into
Conversation
…ntaining newlines Fixes Rdatatable#7896 Signed-off-by: Ankit Garg <146389256+AnKiT-GaRG2@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7938 +/- ##
=======================================
Coverage 99.08% 99.08%
=======================================
Files 88 88
Lines 17429 17429
=======================================
Hits 17270 17270
Misses 159 159 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ben-schwen
left a comment
There was a problem hiding this comment.
Most unix filesysteme currently allow \n and I would rather not break this. See also Stack Superuser
…a newline in the name (Rdatatable#7896)
|
Thanks @ben-schwen, you're right that file names can contain newlines. I no longer look for |
.read_yaml_header()always opened its input withfile(), so whentext=(orinput=) was a single string containing newlines, the data itself was treated as a file name and failed withcannot open the connection. A multi-elementtext=worked because it is written to a temp file first.The header is now read through
textConnection()when the input contains\nor\r.Tests 16.23 and 16.24 in
other.Rrawfail without the fix (verified against the unpatched build) and pass with it. I also checked all the csvy test files read identically from a file,text=andinput=. NEWS item added.Closes #7896