exercism / prolog

Exercism exercises in Prolog.
https://exercism.org/tracks/prolog
MIT License
29 stars 37 forks source link

Add hello_world with Travis CI and build.sh #5

Closed parkerl closed 7 years ago

parkerl commented 7 years ago

This seems to work ok. I copied the same build script we used in xElm.

Here is a running build https://travis-ci.org/parkerl/xprolog/jobs/164838544

Edit: This is all green and the exercise is complete.

(P.S. Hope I'm not jumping in when someone else is already on top of this.)

qjd2413 commented 7 years ago

Should we include the ability to pass in a name? Like we have helloWorld/1 which just responds "hello world" and helloWorld/2 which responds with a name? I apologize if my Prolog keywords are wrong, I haven't done too much with it.

parkerl commented 7 years ago

Hi @qjd2413 so that is exactly what the tests expect and this adheres to the API expected in x-common. Are you perhaps looking at an outdated diff? When I initially opened the PR I didn't have the full implementation complete. Thanks

qjd2413 commented 7 years ago

Yeah, I didn't realize the files had changed. My bad!

parkerl commented 7 years ago

I will update the test file to the correct convention. Any other issues?

parkerl commented 7 years ago

Ok this is all set. Updated hello_world_tests.plt and build.sh. I should have mentioned that the build script assumes a strict naming convention where the tests are <slug>_tests.plt, the example is <slug>.example and the template file is <slug>.pl.