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

running a single test #34

Open
mimoo opened this issue Jan 28, 2022 · 5 comments
Open

running a single test #34

mimoo opened this issue Jan 28, 2022 · 5 comments
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.

Comments

@mimoo
Copy link

mimoo commented Jan 28, 2022

Hey!

I'm trying to run a single test via:

../../../../../_build/default/src/lib/pickles/.pickles.inline-tests/inline_test_runner_pickles.exe inline-test-runner Pickles -only-test pickles.ml:981

but I'm getting

ppx_inline_test error: the following -only-test flags matched nothing: pickles.ml:981.

whereas the file indeed exists at my path. I'm a bit confused on how to use that option

@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label Jan 28, 2022
@olleharstedt
Copy link

Bump, also interested in this.

@mimoo
Copy link
Author

mimoo commented Sep 9, 2022

I'm convinced now that there is no way of doing this

@olleharstedt
Copy link

No, it has to be implemented as a new feature. :)

@olleharstedt
Copy link

olleharstedt commented Jan 22, 2023

Would it be possible to run a single test file as an alternative...?

Edit, there's the -only-test flag for this.

@chshersh
Copy link

Bumping, interested in this as well. My use case might not be the most popular but it's a use case nevertheless.

I'm making practical exercises for an OCaml course. I want to leave a function to implement and put inline tests near this function to give usage examples immediately. I also want learners to write the implementation and run tests ONLY FOR THIS NEW FUNCTION, so they can have immediate feedback loop.

I imagine having the same prefix for the same exercise, so you can easily run all inline tests for a single function with an option like --matches "nameOfFunction*" or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.
Projects
None yet
Development

No branches or pull requests

4 participants