()
| 361 | |
| 362 | #[test] |
| 363 | fn character_basic() { |
| 364 | let text = "Hello, World! This is a test."; |
| 365 | let chunks = chunk_text(text, 10, 0, ChunkStrategy::Character).unwrap(); |
| 366 | assert_eq!(chunks.len(), 3); |
| 367 | assert_eq!(chunks[0].text, "Hello, Wor"); |
| 368 | assert_eq!(chunks[0].start, 0); |
| 369 | assert_eq!(chunks[0].end, 10); |
| 370 | assert_eq!(chunks[1].text, "ld! This i"); |
| 371 | assert_eq!(chunks[2].text, "s a test."); |
| 372 | } |
| 373 | |
| 374 | #[test] |
| 375 | fn character_with_overlap() { |
nothing calls this directly
no test coverage detected