Add infinite loop spec
Fix issue #1 patch by @windwiny
v1.0.1