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

test: make gno test without the specified target automatically infer "." to make it familiar for other Go contributors #3420

Closed
odeke-em opened this issue Dec 28, 2024 · 0 comments · Fixed by #3453

Comments

@odeke-em
Copy link
Contributor

Description

It is quite inconvenient to always have to specify gno test -v . when trying to run tests in a directory with the help message asking to specify a directory

Suggestion

Make it similar to the go test command that'll try to run within the current working directory if the package names aren't specified

This is an issue request @petar-dambovaliev @moul

thehowl pushed a commit that referenced this issue Jan 15, 2025
)

This PR resolves #3420 by enhancing
the gno test command.
The command now assumes the current directory (.) as the default path
when no directory is specified, aligning its behavior with go test.

Changes to CI:

- Removed the no_args test.
- Added new tests to cover the following scenarios:
    - Valid test execution.
    - Valid file-based test.
    - Test with flags.
    - Empty directory.
    - Empty test file.

This PR is a repost of #3429 with a
cleaner commit history.

CC @notJoon @moul

---------

Co-authored-by: Nemanya21 <[email protected]>
Co-authored-by: Leon Hudak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

1 participant