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

making it a bit easier to run individual tests in Doc.hs #5517

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

bbarker
Copy link
Contributor

@bbarker bbarker commented Dec 27, 2024

Overview

Previously, running e.g. stack test --fast unison-syntax --ta "DocParser.Hello"

Would result in:

Randomness seed for this run is 5876492311547008607
Raw test output to follow ...
------------------------------------------------------------
------------------------------------------------------------


😶  hmm ... no test results recorded
Tip: use `ok`, `expect`, or `crash` to record results
Tip: if running via `runOnly` or `rerunOnly`, check for typos

Now with this change we get:

🦄  DocParser.Hello.# Hello
🦄  DocParser.HelloAgain.# Hello
## Again

🦄  DocParser.HelloAgain.## Hello
# Again

I'm not sure this is the best solution, but maybe it is something to start with.

@aryairani
Copy link
Contributor

Sorry I thought I’d merged this already

@aryairani
Copy link
Contributor

No wait; this is new 😅

Comment on lines +153 to +154
where
simpleScope = fromMaybe "default" $ headMay $ words $ filter isAlphaNum s
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the issue is that some of the test names are not easy (and maybe not possible?) to provide at the command-line, due to weird stuff like newlines. And are there maybe tests with no name at all?

But could you add some comments to the code about what this line is trying to accomplish and why?

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