Adding tests

@markwingerd 

Not quite finished yet but here are the test's i've done so far.

More to come soon(tm)