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

Improve tests for lexer #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Improve tests for lexer #48

wants to merge 3 commits into from

Conversation

neiser
Copy link
Contributor

@neiser neiser commented Feb 9, 2023

I've changed the tests to become subtests, which is quite convenient when debugging within GoLand or IntelliJ (which is the IDE I'm using). I guess also other IDEs should be able to detect the subtests now and allow to run them individually. Go tooling itself does support that!

While trying to improve test coverage (which is now 100%), I've found some dead code which I introduced in #42. My first PR was under the impression that the lexer supports nested things like ${foo:=${bar:=blub}} but I guess that's actually not supported (yet).

@a8m Do you think supporting nested structures like this is worthwhile? That would require a large refactoring of the lexer I suppose.

@neiser
Copy link
Contributor Author

neiser commented Feb 9, 2023

@a8m PS: If you like that test refactoring, I can also have a look at parse_test.go.

this enables running single tests from idea and
also shows better reports when single tests fail
this was found after adding more test cases
and finding that those lines were not covered
@neiser
Copy link
Contributor Author

neiser commented Feb 23, 2023

@a8m Sorry for bugging, but any comment on this?

parse/lex.go Outdated Show resolved Hide resolved
…alue

this reverts parts of previous commit and resolves a8m#48 (comment)
@neiser
Copy link
Contributor Author

neiser commented May 9, 2023

@a8m any update? I've addressed your comments, and maybe it's nice to merge it?

@neiser
Copy link
Contributor Author

neiser commented Apr 2, 2024

@a8m Just checking in again after quite some time. Any desire to merge this?

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

Successfully merging this pull request may close these issues.

None yet

2 participants