Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Useless trivia. Perl was doing unit testing back in the mid-80s. One of Perl's early selling points was how portable they were, and the fact that they had comprehensive unit tests so long before the rest of the industry realized that was a good idea is one of the reasons for it.


More like that they invented a simple test protocol, called TAP. It's slow, because perl runs it, but you can also emit tap from C or C++, and it's much easier and more flexible than dejagnu or other low-level test frameworks.


It wasn't just a test protocol. Perl 1 came with a test suite, which its Makefile ran by default before installation.

As Perl grew up, the idea of "you have tests for at least basic stuff" was built into the culture. For example back in the mid-90s it was expected that every module came with a test suite, and every site would run that test suite before installing the module. When you went to package something for CPAN, you were expected to have a ./t directory with tests, and there were lots of examples to show you how to do it. And automated scripts that expected you do to it.

It was something like 15 years before anyone thought of naming the test protocol. It was just how you did things.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: