()
| 308 | } |
| 309 | |
| 310 | pub fn get_user_chat_template() -> String { |
| 311 | let library_name = get_library_name(); |
| 312 | let deopt = Deopt::new(library_name).unwrap(); |
| 313 | let mut template = get_user_gen_template().to_string(); |
| 314 | if let Some(landmark) = deopt.get_library_landmark_corpus() { |
| 315 | template.insert_str(0, &format!("The input data is: {landmark}\n\n\n.")); |
| 316 | } |
| 317 | if let Some(init) = &deopt.config.spec { |
| 318 | template.push_str(&format!("\nThe begining of the fuzz driver is: \n{init}")) |
| 319 | } |
| 320 | if let Some(disable_fmemopen) = &deopt.config.disable_fmemopen { |
| 321 | if *disable_fmemopen { |
| 322 | template = template.replace( |
| 323 | "fmemopen((void *)data, size, \"rb\")", |
| 324 | "fopen(\"input_file\", \"rb\")", |
| 325 | ); |
| 326 | } |
| 327 | } |
| 328 | template |
| 329 | } |
no test coverage detected