(content: &str, section: &str, field: &str)
| 1207 | } |
| 1208 | |
| 1209 | fn extract_acl_field(content: &str, section: &str, field: &str) -> Option<String> { |
| 1210 | let section_start = content.find(section)?; |
| 1211 | let section_content = &content[section_start..]; |
| 1212 | // Find the field within the section (before next top-level block) |
| 1213 | let field_pattern = format!("{} = \"", field); |
| 1214 | let field_start = section_content.find(&field_pattern)?; |
| 1215 | let value_start = field_start + field_pattern.len(); |
| 1216 | let value_end = section_content[value_start..].find('"')?; |
| 1217 | Some(section_content[value_start..value_start + value_end].to_string()) |
| 1218 | } |
| 1219 | |
| 1220 | #[tokio::test] |
| 1221 | #[ignore] |
no test coverage detected