~jvk/apb

APB a testing library for AWK

081a728 Added shellspec ref to README

~jvk pushed to ~jvk/apb git

1 year, 6 months ago

d58a47a Added ADRs 1-3

~jvk pushed to ~jvk/apb git

1 year, 6 months ago

#APB

APB a testing library for GNU AWK

So we instituted a rigorous regression test for all of the features of AWK.
Any of the three of us who put in a new feature into the language from then on,
first had to write a test for the new feature.

(Alfred V. Aho in The A-Z of Programming Languages: AWK)

I don't see why they should have all the fun.

#Mission

  • Provide unit tests for user defined or library functions in AWK scripts.
  • Do not provide testing facilities for actual AWK scripts.

#Rationale

Typical AWK scripts are only a few lines short. If they were so long and involved so as to need proper testing, another language might be a better fit.

User defined and library functions on the other hand might abstract a lot of complexity and are called repeatedly on varying input. If you want to test your functions (because of TDD, specifications or respect for fellow human beings) -- APB comes to the rescue!

If you still want to test your AWK script as a whole, some shell test framework like bats or shellspec might help you out.