a8m / envsubst

Environment variables substitution for Go
MIT License
747 stars 83 forks source link

Improve tests for lexer #48

Open neiser opened 1 year ago

neiser commented 1 year ago

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 commented 1 year ago

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

neiser commented 1 year ago

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

neiser commented 1 year ago

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

neiser commented 5 months ago

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