Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read file with a LF at the end #8

Open
JuustoMestari opened this issue Jun 6, 2019 · 6 comments
Open

Read file with a LF at the end #8

JuustoMestari opened this issue Jun 6, 2019 · 6 comments

Comments

@JuustoMestari
Copy link

Hi,
I was testing the module with a file having a LF character as the latest character and it looks like it is not working properly. There is no error message so it's difficult to figure out what the problem is.
I have tested the same file with the standard readline module and it works fine.
I was using it like this : await rlp.forEach((line, index) => { console.log(line); })
Could someone test and let me know if you get the same issue?

@bhoriuchi
Copy link
Owner

Please provide a test file and code to reproduce

@JuustoMestari
Copy link
Author

@hwinkler
Copy link

hwinkler commented Nov 3, 2019

I've confirmed this bug on my own test file.
Removing the final LF character enable the promise to resolve.

@hwinkler
Copy link

hwinkler commented Nov 4, 2019

Inserting a zero-length line anywhere in __test__/file.txt causes the unit tests to fail.

@bilalshaikh42
Copy link

Any chance this will be updated? Running into this issue as well

@bhoriuchi
Copy link
Owner

i added some test cases which all passed on the current code. I have also updated the dev deps and published v1.0.5 please see if your issues are resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants