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

__FILE__ breaks if filename contains a quote #546

Closed
ISSOtm opened this issue Jul 28, 2020 · 8 comments
Closed

__FILE__ breaks if filename contains a quote #546

ISSOtm opened this issue Jul 28, 2020 · 8 comments
Labels
bug Unexpected behavior / crashes; to be fixed ASAP! rgbasm This affects RGBASM

Comments

@ISSOtm
Copy link
Member

ISSOtm commented Jul 28, 2020

That's about it. The quote(s) need(s) to be escaped.

@ISSOtm ISSOtm added bug Unexpected behavior / crashes; to be fixed ASAP! rgbasm This affects RGBASM labels Sep 7, 2020
@JL2210
Copy link
Contributor

JL2210 commented Sep 19, 2020

Fixed by #566
Probably still needs to be implemented in #557

ISSOtm added a commit that referenced this issue Sep 19, 2020
Check for quotes in `__FILE__`
@ISSOtm
Copy link
Member Author

ISSOtm commented Sep 19, 2020

I added a regression test that'll ensure that the new lexer will have to implement it.

@ISSOtm ISSOtm closed this as completed Sep 19, 2020
@AntonioND
Copy link
Member

That's great, and that's why we need more tests. With enough coverage it becomes far less scary to make big changes...

@ISSOtm
Copy link
Member Author

ISSOtm commented Sep 20, 2020

There is however one unintended consequence of adding this test: Windows is not feeling too great about it due to... the quote. I'm not sure how to solve this...

@AntonioND
Copy link
Member

I think that we shouldn't have that test, probably. I mean, we should have the test, but the file could be generated by the test scripts, and it could be skipped on Windows. Having weird file names is a bad idea.

@ISSOtm
Copy link
Member Author

ISSOtm commented Sep 21, 2020

Well, I tried generating the test from within the test script, and it somehow still gets generated. How? Beats me. Guess it should only be generated when not on Windows, but how is that detectable reliably? I tried uname, but it returns "MinGW", which is probably not suitable...

@AntonioND
Copy link
Member

Oh, of course, you need to skip the test on Windows. I think that using uname and checking for MinGW is fine, actually. We can always add other strings if needed in the future.

@ISSOtm
Copy link
Member Author

ISSOtm commented Sep 22, 2020

Fixed it in 9742fa7, then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behavior / crashes; to be fixed ASAP! rgbasm This affects RGBASM
Projects
None yet
Development

No branches or pull requests

3 participants