(write: bool)
| 7674 | } |
| 7675 | |
| 7676 | fn generate_wasix_export_list(write: bool) -> Result<()> { |
| 7677 | let output = wasix_export_list_text()?; |
| 7678 | if write { |
| 7679 | let path = Path::new("assets/generated/wasix-dl.exports"); |
| 7680 | if let Some(parent) = path.parent() { |
| 7681 | fs::create_dir_all(parent).with_context(|| format!("create {}", parent.display()))?; |
| 7682 | } |
| 7683 | fs::write(path, output).with_context(|| format!("write {}", path.display()))?; |
| 7684 | } else { |
| 7685 | print!("{output}"); |
| 7686 | } |
| 7687 | Ok(()) |
| 7688 | } |
| 7689 | |
| 7690 | fn check_generated_wasix_export_list(strict: bool) -> Result<()> { |
| 7691 | let expected = match wasix_export_list_text() { |
no test coverage detected