(Closes #457) Fix bug with backslash in strings#462
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #462 +/- ##
==========================================
- Coverage 92.15% 92.15% -0.01%
==========================================
Files 86 86
Lines 13734 13733 -1
==========================================
- Hits 12657 12656 -1
Misses 1077 1077 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The PSyclone test suite is happy with this branch of fparser so I declare it ready for review. It is a small but quite fundamental change in behaviour that affects both fparser1 and fparser2. However, since interpreting a |
hiker
left a comment
There was a problem hiding this comment.
Thanks a lot for this. The loop looks a lot simpler that what it was before, that's great. I do have the feeling that there is a bug though, please check the comments (and if I am wrong, it needs some tests :) ).
arporter
left a comment
There was a problem hiding this comment.
Somehow I've accidentally started a review while attempting to reply to your comments. Anyhow, I've given up on AI and gone back to NI to write a new implementation. I think it's easier to understand now.
|
OK, ready for another look now @hiker. |
hiker
left a comment
There was a problem hiding this comment.
Ready to be merged, thanks!
|
Dang, I need to take that "ready to be merged" back. One line was not covered by your new tests, and that line is actually wrong: I believe this is the fix: |
|
Thanks for finding that bug. I didn't understand your suggested change to the test so have made my own. Hope it's in-line with what you had in mind. Weirdly, I couldn't find any report saying that line wasn't covered - how did you find it? Ready for another look now. |
hiker
left a comment
There was a problem hiding this comment.
Looks good now. Your example tests that line similarly to mine, so that's fine.
Weirdly, fparser was interpreting backslash
"\"as an escape character. This is not a standard Fortran feature. i.e. if you want to escape a quotation mark in a Fortran string you simply repeat it:"''"means"'".