-
Notifications
You must be signed in to change notification settings - Fork 45
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
Left trim optional spaces in event field values #182
Left trim optional spaces in event field values #182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice PR!
Can you please add/amend the tests for this functionality?
@elbrujohalcon thanks for feedback and patience. I added some event parsing unit tests in 3d9ea47. How does that look? |
test/shotgun_unit_SUITE.erl
Outdated
-spec init_per_suite(shotgun_test_utils:config()) -> | ||
shotgun_test_utils:config(). | ||
init_per_suite(Config) -> | ||
Config. | ||
|
||
-spec end_per_suite(shotgun_test_utils:config()) -> shotgun_test_utils:config(). | ||
end_per_suite(Config) -> | ||
Config. | ||
|
||
-spec init_per_testcase(atom(), shotgun_test_utils:config()) -> | ||
shotgun_test_utils:config(). | ||
init_per_testcase(_, Config) -> | ||
Config. | ||
|
||
-spec end_per_testcase(atom(), shotgun_test_utils:config()) -> | ||
shotgun_test_utils:config(). | ||
end_per_testcase(_, Config) -> | ||
Config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all optional and they're not doing anything at all in this case. I would recommend just removing them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right of course, removed in 3a243ff. Thanks.
The SSE spec says that space(s) after a
:
when parsing event stream are optional. Currentlyshotgun
requires one space. Here I trim these insignificant spaces to be compatible with the spec. SSE tests still pass becauselasse
appears to always send that optional space.