test(mineru): dump parsed markdown for live content proof
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user