Major test re-write

There were some parsing issues and the test was not as general
as it should have been