This commit is contained in:
11
fixtures/batch/batch_bytes_invalid_mime.json
Normal file
11
fixtures/batch/batch_bytes_invalid_mime.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "batch_bytes_invalid_mime",
|
||||
"category": "batch",
|
||||
"description": "batch_extract_bytes_sync invalid MIME",
|
||||
"tags": ["batch", "error"],
|
||||
"call": "batch_extract_bytes_sync",
|
||||
"input": {
|
||||
"items": [{ "content": [72, 101, 108, 108, 111], "mime_type": "application/x-nonexistent" }]
|
||||
},
|
||||
"assertions": [{ "type": "not_error" }]
|
||||
}
|
||||
30
fixtures/batch/batch_extract_bytes_happy.json
Normal file
30
fixtures/batch/batch_extract_bytes_happy.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"id": "batch_extract_bytes_happy",
|
||||
"category": "batch",
|
||||
"description": "batch_extract_bytes: happy path with mixed inputs",
|
||||
"call": "batch_extract_bytes",
|
||||
"input": {
|
||||
"items": [
|
||||
{
|
||||
"content": [72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33],
|
||||
"mime_type": "text/plain"
|
||||
},
|
||||
{
|
||||
"content": [
|
||||
60, 104, 116, 109, 108, 62, 60, 98, 111, 100, 121, 62, 84, 101, 115, 116, 60, 47, 98, 111,
|
||||
100, 121, 62, 60, 47, 104, 116, 109, 108, 62
|
||||
],
|
||||
"mime_type": "text/html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"assertions": [
|
||||
{
|
||||
"type": "not_error"
|
||||
},
|
||||
{
|
||||
"type": "count_min",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
19
fixtures/batch/batch_extract_bytes_mixed_format.json
Normal file
19
fixtures/batch/batch_extract_bytes_mixed_format.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"id": "batch_extract_bytes_mixed_format",
|
||||
"category": "batch",
|
||||
"description": "batch_extract_bytes: handles unsupported MIME gracefully",
|
||||
"call": "batch_extract_bytes",
|
||||
"input": {
|
||||
"items": [
|
||||
{
|
||||
"content": [80, 68, 70, 32, 112, 108, 97, 99, 101, 104, 111, 108, 100, 101, 114],
|
||||
"mime_type": "application/x-unknown"
|
||||
}
|
||||
]
|
||||
},
|
||||
"assertions": [
|
||||
{
|
||||
"type": "not_error"
|
||||
}
|
||||
]
|
||||
}
|
||||
51
fixtures/batch/batch_extract_bytes_size_cap.json
Normal file
51
fixtures/batch/batch_extract_bytes_size_cap.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"id": "batch_extract_bytes_size_cap",
|
||||
"category": "batch",
|
||||
"description": "batch_extract_bytes: archive size cap triggers error",
|
||||
"call": "batch_extract_bytes",
|
||||
"skip": {
|
||||
"languages": [
|
||||
"rust",
|
||||
"node",
|
||||
"python",
|
||||
"php",
|
||||
"wasm",
|
||||
"go",
|
||||
"r",
|
||||
"ruby",
|
||||
"csharp",
|
||||
"elixir",
|
||||
"kotlin",
|
||||
"kotlin_android",
|
||||
"swift",
|
||||
"zig",
|
||||
"java",
|
||||
"dart"
|
||||
],
|
||||
"reason": "SecurityLimits.max_content_size is only enforced by archive/Excel extractors; test requires actual archive format to trigger error, which is not easily testable via byte fixtures"
|
||||
},
|
||||
"input": {
|
||||
"items": [
|
||||
{
|
||||
"content": [
|
||||
97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
|
||||
97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
|
||||
97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
|
||||
97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
|
||||
97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97
|
||||
],
|
||||
"mime_type": "text/plain"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"security_limits": {
|
||||
"max_content_size": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"assertions": [
|
||||
{
|
||||
"type": "error"
|
||||
}
|
||||
]
|
||||
}
|
||||
18
fixtures/batch/batch_extract_bytes_sync_empty_list.json
Normal file
18
fixtures/batch/batch_extract_bytes_sync_empty_list.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"id": "batch_extract_bytes_sync_empty_list",
|
||||
"category": "batch",
|
||||
"description": "batch_extract_bytes_sync: empty batch",
|
||||
"call": "batch_extract_bytes_sync",
|
||||
"input": {
|
||||
"items": []
|
||||
},
|
||||
"assertions": [
|
||||
{
|
||||
"type": "not_error"
|
||||
},
|
||||
{
|
||||
"type": "count_equals",
|
||||
"value": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
19
fixtures/batch/batch_extract_bytes_sync_invalid_mime.json
Normal file
19
fixtures/batch/batch_extract_bytes_sync_invalid_mime.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"id": "batch_extract_bytes_sync_invalid_mime",
|
||||
"category": "batch",
|
||||
"description": "batch_extract_bytes_sync: unsupported MIME",
|
||||
"call": "batch_extract_bytes_sync",
|
||||
"input": {
|
||||
"items": [
|
||||
{
|
||||
"content": [100, 97, 116, 97],
|
||||
"mime_type": "application/x-unknown"
|
||||
}
|
||||
]
|
||||
},
|
||||
"assertions": [
|
||||
{
|
||||
"type": "not_error"
|
||||
}
|
||||
]
|
||||
}
|
||||
33
fixtures/batch/batch_file_async_basic.json
Normal file
33
fixtures/batch/batch_file_async_basic.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"id": "batch_file_async_basic",
|
||||
"category": "batch",
|
||||
"description": "Extract text from multiple files asynchronously",
|
||||
"tags": [
|
||||
"batch",
|
||||
"async",
|
||||
"concurrent",
|
||||
"multiple_files"
|
||||
],
|
||||
"call": "batch_extract_files",
|
||||
"input": {
|
||||
"paths": [
|
||||
{
|
||||
"path": "pdf/fake_memo.pdf"
|
||||
},
|
||||
{
|
||||
"path": "text/fake_text.txt"
|
||||
}
|
||||
]
|
||||
},
|
||||
"assertions": [
|
||||
{
|
||||
"type": "not_error"
|
||||
}
|
||||
],
|
||||
"skip": {
|
||||
"languages": [
|
||||
"wasm"
|
||||
],
|
||||
"reason": "WASM cannot access filesystem; use extractBytes with file content instead"
|
||||
}
|
||||
}
|
||||
28
fixtures/batch/batch_file_async_not_found.json
Normal file
28
fixtures/batch/batch_file_async_not_found.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": "batch_file_async_not_found",
|
||||
"category": "batch",
|
||||
"description": "batch_extract_file async nonexistent",
|
||||
"tags": [
|
||||
"batch",
|
||||
"async"
|
||||
],
|
||||
"call": "batch_extract_files",
|
||||
"input": {
|
||||
"paths": [
|
||||
{
|
||||
"path": "/nonexistent/a.pdf"
|
||||
}
|
||||
]
|
||||
},
|
||||
"assertions": [
|
||||
{
|
||||
"type": "not_error"
|
||||
}
|
||||
],
|
||||
"skip": {
|
||||
"languages": [
|
||||
"wasm"
|
||||
],
|
||||
"reason": "WASM cannot access filesystem; use extractBytes with file content instead"
|
||||
}
|
||||
}
|
||||
31
fixtures/batch/batch_file_not_found.json
Normal file
31
fixtures/batch/batch_file_not_found.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"id": "batch_file_not_found",
|
||||
"category": "batch",
|
||||
"description": "batch_extract_file_sync nonexistent",
|
||||
"tags": [
|
||||
"batch",
|
||||
"error"
|
||||
],
|
||||
"call": "batch_extract_files_sync",
|
||||
"input": {
|
||||
"paths": [
|
||||
{
|
||||
"path": "/nonexistent/a.pdf"
|
||||
},
|
||||
{
|
||||
"path": "/nonexistent/b.txt"
|
||||
}
|
||||
]
|
||||
},
|
||||
"assertions": [
|
||||
{
|
||||
"type": "not_error"
|
||||
}
|
||||
],
|
||||
"skip": {
|
||||
"languages": [
|
||||
"wasm"
|
||||
],
|
||||
"reason": "WASM cannot access filesystem; use extractBytes with file content instead"
|
||||
}
|
||||
}
|
||||
30
fixtures/batch/batch_file_partial.json
Normal file
30
fixtures/batch/batch_file_partial.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"id": "batch_file_partial",
|
||||
"category": "batch",
|
||||
"description": "batch_extract_file_sync mixed",
|
||||
"tags": [
|
||||
"batch"
|
||||
],
|
||||
"call": "batch_extract_files_sync",
|
||||
"input": {
|
||||
"paths": [
|
||||
{
|
||||
"path": "text/plain.txt"
|
||||
},
|
||||
{
|
||||
"path": "/nonexistent/missing.pdf"
|
||||
}
|
||||
]
|
||||
},
|
||||
"assertions": [
|
||||
{
|
||||
"type": "not_error"
|
||||
}
|
||||
],
|
||||
"skip": {
|
||||
"languages": [
|
||||
"wasm"
|
||||
],
|
||||
"reason": "WASM cannot access filesystem; use extractBytes with file content instead"
|
||||
}
|
||||
}
|
||||
32
fixtures/batch/batch_file_sync_basic.json
Normal file
32
fixtures/batch/batch_file_sync_basic.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"id": "batch_file_sync_basic",
|
||||
"category": "batch",
|
||||
"description": "Extract text from multiple files synchronously",
|
||||
"tags": [
|
||||
"batch",
|
||||
"sync",
|
||||
"multiple_files"
|
||||
],
|
||||
"call": "batch_extract_files_sync",
|
||||
"input": {
|
||||
"paths": [
|
||||
{
|
||||
"path": "pdf/fake_memo.pdf"
|
||||
},
|
||||
{
|
||||
"path": "text/fake_text.txt"
|
||||
}
|
||||
]
|
||||
},
|
||||
"assertions": [
|
||||
{
|
||||
"type": "not_error"
|
||||
}
|
||||
],
|
||||
"skip": {
|
||||
"languages": [
|
||||
"wasm"
|
||||
],
|
||||
"reason": "WASM cannot access filesystem; use extractBytes with file content instead"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user