test cases for scanner