alandipert / gherkin

a functional programming language and interpreter written in GNU Bash 4
https://tailrecursion.com/~alan/Lisp/GherkinHistory.html
BSD 3-Clause "New" or "Revised" License
522 stars 31 forks source link

Add unit tests #10

Open joelmccracken opened 11 years ago

joelmccracken commented 11 years ago

It seems like this could be extremely useful.

A decent project to start with might be bats: https://github.com/sstephenson/bats

alandipert commented 11 years ago

Totally, but we should hold off until namespaces, exceptions, and deftype are baked. Then we'll be able to have our own testing library :-)

joelmccracken commented 11 years ago

Yeah, though it's helpful to use tests even at this early stage

Sent from my iPhone

On Nov 19, 2013, at 11:31 AM, Alan Dipert notifications@github.com wrote:

Totally, but we should hold off until namespaces, exceptions, and deftype are baked. Then we'll be able to have our own testing library :-)

— Reply to this email directly or view it on GitHub.

quoll commented 11 years ago

This has occurred to me as well.

Part of the reason I've been pushing things into core is to test out what I'm doing. Stacking functions on top of each other ensures that the whole framework is stable. It's not unit testing, but it does find problems.

However, the repl testing I'm doing can always be neglected, so it would be nice to automate it a little. A simple file like test.gk could run a series of assertions, with the expectation that they're all true. It's not much, but it might be a start.

On Tue, Nov 19, 2013 at 6:01 PM, Joel McCracken notifications@github.comwrote:

Yeah, though it's helpful to use tests even at this early stage

Sent from my iPhone

On Nov 19, 2013, at 11:31 AM, Alan Dipert notifications@github.com wrote:

Totally, but we should hold off until namespaces, exceptions, and deftype are baked. Then we'll be able to have our own testing library :-)

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/alandipert/gherkin/issues/10#issuecomment-28847709 .