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

[Bug] Fixes spaces in variable resolution for base parser #68

Conversation

matthewfcarlson
Copy link
Contributor

fixes #56

line = "Hello $ (name)!"
self.assertEqual(parser.ReplaceVariables(line), "Hello sean!")
line = "Hello $( name )!"
self.assertEqual(parser.ReplaceVariables(line), "Hello sean!")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test for the negative case? e.g. missing $

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like line = "Hello name" or line = "Hello $name"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First one, then the other! :)

@spbrogan
Copy link
Member

spbrogan commented Jan 17, 2020

Is this syntax valid according to DSC spec? Is it allowed 1 space? N spaces?

@matthewfcarlson
Copy link
Contributor Author

matthewfcarlson commented Jan 23, 2020

@matthewfcarlson matthewfcarlson added the invalid This doesn't seem right label Jan 23, 2020
@matthewfcarlson matthewfcarlson deleted the bug/fix-spaces-variables branch February 26, 2020 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace variables doesn't work well when there is a space
3 participants