Skip to content

Remove duplicate test function from list-ops-test.el (#225) #238

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

Conversation

berquist
Copy link
Contributor

@berquist berquist commented Nov 9, 2022

If there is a duplicate test present when running ERT on a whole file from the command line, it will complain loudly and not even attempt to run any of the tests.

Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

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

Nice catch!

@ErikSchierboom ErikSchierboom merged commit 02cb895 into exercism:main Nov 9, 2022
@berquist berquist deleted the list-ops-remove-duplicate-test-function branch November 9, 2022 12:42
@fapdash
Copy link
Contributor

fapdash commented Nov 9, 2022

@berquist Nice catch, thank you. :)
Seems like a nice check to have, sadly the way I run ert from the command line doesn't produce this error.
With which command are you running ert and which Emacs version are you using?

@berquist
Copy link
Contributor Author

berquist commented Nov 9, 2022

It's verbatim the "From the terminal" section in the help (which I just noticed says -batch and not --batch):

#!/usr/bin/env sh

emacs --batch -l ert -l "${1}" -f ert-run-tests-batch-and-exit

My brain must have glossed over the interactive run section...

I'm using 29.0.50, something reasonably close to HEAD.

@fapdash
Copy link
Contributor

fapdash commented Nov 9, 2022

@berquist Might be new behavior for Emacs 29. And Emacs seems to be fine with -batch, the CI run even calls it like that:

emacs -batch -l ert -l "${exercise}-test.el" -f ert-run-tests-batch-and-exit

@fapdash
Copy link
Contributor

fapdash commented Nov 9, 2022

Interesting, the Emacs Manual also advises to use -batch: https://www.gnu.org/software/emacs/manual/html_node/ert/Running-Tests-in-Batch-Mode.html 🤷

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