Improve test case for line counter