Fix const string interpolation test#12038
Merged
rgwood merged 3 commits intonushell:mainfrom Mar 2, 2024
Merged
Conversation
Currently, the formatted string includes `(X years ago)`, which means the test would have to be updated every year
rgwood
approved these changes
Mar 2, 2024
Contributor
rgwood
left a comment
There was a problem hiding this comment.
Don't think the description is 100% accurate b/c this no longer uses a regex, but LGTM thanks!
Member
Author
|
@rgwood Whoops, I initially used regex and then switched to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Currently, in the test for interpolating strings at parse-time, the formatted string includes
(X years ago)(from formatting a date) (test came from #11562). I didn't realize when I was writing it that it would have to be updated every year.This PR uses regex to check the output instead.This PR uses.containsinstead.User-Facing Changes
Tests + Formatting
After Submitting