YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
test for ocr function
matthew-heartful2d250bc8e72e
diff --git a/screenpipe-vision/tests/integration_test.rs b/screenpipe-vision/tests/integration_test.rsnew file mode 100644index 000000000..098d90b3f--- /dev/null+++ b/screenpipe-vision/tests/integration_test.rs@@ -0,0 +1,25 @@+use assert_fs::prelude::*;+use std::path::PathBuf;+use std::fs;+use screenpipe_vision::core::perform_ocr; // Adjust the import path++#[test]+fn test_ocr_output() -> Result<(), Box<dyn std::error::Error>> {+ println!("Starting test_ocr_output");++ // Use the correct path to the testing_OCR.png file+ let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));+ path.push("tests/testing_OCR.png");+ println!("Path to testing_OCR.png: {:?}", path);++ let image = image::open(&path).expect("Failed to open image");+ let (text, tsv_output) = perform_ocr(&image);++ println!("OCR Text: {}", text);+ println!("TSV Output: {}", tsv_output);++ assert!(!text.is_empty(), "OCR text should not be empty");+ assert!(!tsv_output.is_empty(), "TSV output should not be empty");++ Ok(())+}\ No newline at end of filediff --git a/screenpipe-vision/tests/testing_OCR.png b/screenpipe-vision/tests/testing_OCR.pngnew file mode 100644index 000000000..8c3131fe4Binary files /dev/null and b/screenpipe-vision/tests/testing_OCR.png differ