Skip to content

Fix const string interpolation test - #12038

Merged
rgwood merged 3 commits into
nushell:mainfrom
ysthakur:fix-const-str-interp-test
Mar 2, 2024
Merged

rgwood merged 3 commits into
nushell:mainfrom
ysthakur:fix-const-str-interp-test

Conversation

@ysthakur

@ysthakur ysthakur commented Mar 1, 2024 •

Copy link
Copy Markdown
Member

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 .contains instead.

User-Facing Changes

Tests + Formatting

After Submitting

ysthakur added 3 commits March 1, 2024 17:10
Currently, the formatted string includes `(X years ago)`, which means the test would have to be updated every year
@ysthakur
ysthakur marked this pull request as ready for review March 1, 2024 23:34

@rgwood rgwood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't think the description is 100% accurate b/c this no longer uses a regex, but LGTM thanks!

@rgwood
rgwood merged commit 9852504 into nushell:main Mar 2, 2024
@ysthakur

ysthakur commented Mar 2, 2024

Copy link
Copy Markdown
Member Author

@rgwood Whoops, I initially used regex and then switched to .contains to match a different, existing date formatting test, my bad. Description has been updated

@ysthakur
ysthakur deleted the fix-const-str-interp-test branch March 2, 2024 00:36
@hustcer hustcer added this to the v0.91.0 milestone Mar 2, 2024
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.

3 participants