Add test case same as #166

We cannot merge #166 patches. I fixed it for merging to current source.
Merge pull request #282 from auto-complete/add-test

Add test case same as #166