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

Packs could have a standardized layout for PLT (Tests) #60

Open
TeamSPoon opened this issue Nov 10, 2019 · 1 comment
Open

Packs could have a standardized layout for PLT (Tests) #60

TeamSPoon opened this issue Nov 10, 2019 · 1 comment

Comments

@TeamSPoon
Copy link

TeamSPoon commented Nov 10, 2019

Test files in Packs might have a standard expected layout so can do things like:

?- pack_run_tests(some_pack,[....]).

or

?- pack_verify(some_pack,[....]).

Right now everyone uses: test/ tests/ t/ or your_mom/

Maybe a pathname or something could be added to the pack.pl file?

and/or a single file found someplace like pack_verify.plt

And maybe a way to globally test all packs (for all packs that conform to this standard) like:

?- pack_test_all([include([pack1,pack2...]),exclude(...). ...]). 
@JanWielemaker
Copy link
Member

That makes a lot of sense. The internal test files use these conventions:

  • named test_*.pl
  • Have module that is equal to the file name (minus .pl)
  • Export a predicate that is equal to the file name (minus .pl) and has no arguments
  • Expect the predicate to succeed if there is no issue.
  • Often this calls run_tests([test1, test2. ...]).

Given a standard directory name, we are done in that case. That might be easier than extending pack.pl?

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

No branches or pull requests

2 participants