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

testscript: trim '.txtar' extension from subtest name #179

Merged
merged 1 commit into from
Aug 20, 2022

Conversation

bitfield
Copy link
Contributor

I noticed that, while the .txt extension is stripped from the script filename when constructing the subtest name passed to t.Run, the same is not done for scripts with a .txtar extension. This commit strips .txtar too.

Rather than add an explicit test for this, I changed the name of one of the existing test scripts from .txt to .txtar, so that the tests would fail unless the extension is correctly stripped.

@bitfield bitfield changed the title Trim '.txtar' extension from subtest name testscript: trim '.txtar' extension from subtest name Aug 20, 2022
Copy link
Collaborator

@mvdan mvdan left a comment

Choose a reason for hiding this comment

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

Nicely spotted; I must have missed this when I added support for txtar filename extensions.

@mvdan mvdan merged commit 57a71e0 into rogpeppe:master Aug 20, 2022
@bitfield bitfield deleted the trim_txtar branch August 20, 2022 17:53
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.

2 participants