simplify logic in test get_input_file_name

relates #381