feat: scan

This commit is contained in:
hashbro
2026-09-13 02:12:06 +08:00
parent d7bd4d1b03
commit 1746e7b485
13 changed files with 266 additions and 40 deletions
+12
View File
@@ -40,6 +40,18 @@ class NoteContentTest extends TestCase
$this->assertSame([], NoteContent::fromList(["\n(\n\t (\n"]));
}
#[Test]
public function keeps_full_single_line_body_when_longer_than_title(): void
{
$line = '1.during 2.exhaust 3.tool 4.custom 5.smart 6.old 7.busy 8.region 9.skin 10.wasp 11.attitude 12.wrist';
$items = NoteContent::fromList([$line]);
$this->assertCount(1, $items);
$this->assertTrue(str_starts_with($line, $items[0]['title']));
$this->assertSame($line, $items[0]['body']);
$this->assertStringContainsString('12.wrist', $items[0]['body']);
}
#[Test]
public function keeps_title_as_body_when_rest_is_notes_junk(): void
{