tests for examples in the spec. fixes #112, #414, #415, #416, #417, #418