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

Emit an error when the user supplies an empty suite name #265

Merged
merged 3 commits into from
Aug 17, 2020

Conversation

craigfe
Copy link
Member

@craigfe craigfe commented Aug 3, 2020

Fix #264.

This emits an error message when the user supplies an empty test suite name, which previously raised an uncaught exception due to trying to create a corresponding symlink with an empty name. As discussed in the linked issue, it seems better to avoid empty suite names altogether.

Also adds a test for the similar case for empty test names, which isn't as problematic since we already append integers to these files on disk. In this case, I just chose to alter the filenames slightly to make sure that they don't start with a ..

Introduces a common user_error function for handling such cases.

@craigfe craigfe force-pushed the forbid-empty-suite-name branch 2 times, most recently from de6e6e5 to 88136a6 Compare August 3, 2020 14:37
@craigfe
Copy link
Member Author

craigfe commented Aug 10, 2020

Will merge at the end of this week unless there are objections.

@craigfe craigfe force-pushed the forbid-empty-suite-name branch from 88136a6 to 22c84f4 Compare August 17, 2020 10:06
@craigfe craigfe merged commit fef6124 into mirage:master Aug 17, 2020
craigfe added a commit to craigfe/opam-repository that referenced this pull request Aug 26, 2020
…lwt (1.2.2)

CHANGES:

- Fail gracefully when the user supplies an empty suite name. (mirage/alcotest#265, @craigfe)

- Fix compatibility with `fmt.0.8.8+dune` by adding a missing `fmt` dependency
  in `alcotest`'s dune file (mirage/alcotest#266, @NathanReb)

- Only show "in progress" lines when writing to a TTY. (mirage/alcotest#267, @craigfe)
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.

uncaught exception: Unix.EPERM unlink
1 participant