feat: update backend OCR parser, web app, mobile app camera/preview UI, tests, and documentation with sample images
This commit is contained in:
1 parent
aa3233e411
commit
bdb3a49742
71 files changed
+3360
-764
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import 'dart:io';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:app_pfm_ocr_v2/core/utils/exif_helper.dart';
|
||||
|
||||
void main() {
|
||||
test('ExifHelper returns null for non-existent file', () async {
|
||||
final result = await ExifHelper.extractGps('non_existent_file.jpg');
|
||||
expect(result, isNull);
|
||||
});
|
||||
|
||||
test('ExifHelper returns null for plain text files / invalid images', () async {
|
||||
final tempDir = Directory.systemTemp.createTempSync();
|
||||
final tempFile = File('${tempDir.path}/plain_text.txt');
|
||||
tempFile.writeAsStringSync('not a jpg image file data');
|
||||
|
||||
try {
|
||||
final result = await ExifHelper.extractGps(tempFile.path);
|
||||
expect(result, isNull);
|
||||
} finally {
|
||||
tempFile.deleteSync();
|
||||
tempDir.deleteSync();
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user