wrapped tests in -bash==__FILE__ block

* So code is usable as a library