test/parser: Add check_file_contents