From c026ad7160185fb6d167d927fc44e3cb619cbe2b Mon Sep 17 00:00:00 2001 From: weichen Date: Mon, 21 Sep 2026 11:10:42 +0000 Subject: [PATCH] test(mineru): dump parsed markdown for live content proof Co-authored-by: Cursor --- internal/mineru/live_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/mineru/live_test.go b/internal/mineru/live_test.go index 718c68fe..bff8a654 100644 --- a/internal/mineru/live_test.go +++ b/internal/mineru/live_test.go @@ -53,6 +53,12 @@ func TestLive_ParseTinyPDF(t *testing.T) { if pdfPath != "" && res.EngineMode == "" { t.Fatal("missing engine mode") } + // Dump a content sample so the report can prove real text was extracted. + if os.Getenv("MINERU_LIVE_DUMP") != "" { + _ = os.WriteFile(os.Getenv("MINERU_LIVE_DUMP"), []byte(res.Markdown), 0o644) + t.Logf("wrote %d bytes to %s; contains 冲击波=%v", + len(res.Markdown), os.Getenv("MINERU_LIVE_DUMP"), strings.Contains(res.Markdown, "冲击波")) + } } func getenv(k, def string) string {