Add ability to exclude pages (#10)

This commit is contained in:
Jared Dillard
2025-05-17 22:20:14 -07:00
committed by GitHub
parent 10e2b9a684
commit 2c8b554aa2
5 changed files with 236 additions and 8 deletions
+17
View File
@@ -177,6 +177,23 @@ def test_process_includes_with_relative_paths(tmp_path):
assert processed_content == expected_content
def test_match_exclude_pattern():
"""Test the _match_exclude_pattern method."""
# Create a manager
manager = LLMSFullManager()
# Test exact match
assert manager._match_exclude_pattern("page1", "page1") is True
assert manager._match_exclude_pattern("page1", "page2") is False
# Test glob-style patterns
assert manager._match_exclude_pattern("page1", "page*") is True
assert manager._match_exclude_pattern("page_with_include", "page_with_*") is True
assert manager._match_exclude_pattern("page1", "*1") is True
assert manager._match_exclude_pattern("subdir/page1", "*/page1") is True
assert manager._match_exclude_pattern("page1", "subdir/*") is False
def test_write_verbose_info_to_file(tmp_path):
"""Test writing verbose info to a file."""
# Create a manager