Fixed test for sending data from a stream or a filename