Some problems do not have multiple test cases, and are instead judged by testing your code multiple times on different input files. If the problem statement does not say there are multiple cases, do not assume there are.
Other problems mention multiple test cases, but don’t provide any limits on how many there could be. Your program should stop at the end of the input file. All programming languages have a way of testing this; for example, in Java, a BufferedReader’s readLine() method will return null. In C++, scanf returns the number of items successfully matched; EOF if it reaches the end of the file.
Read your programming language’s documentation to find out what it returns.
If you choose to test your program without the redirection method mentioned earlier, you can generate an EOF (end-of-file) character by pressing Ctrl-Z.