import pytest from datetime import datetime from shell_history_search.parsers import ( BashParser, ZshParser, FishParser, parse_shell_history, ) from shell_history_search.models import HistoryEntry class TestBashParser: @pytest.fixture def parser(self): return BashParser() def test_parse_single_entry(self, parser): line = " 1234567890 ls -la" entries = parser.parse(line) assert len(entries) == 1 assert entries[0].command == "ls -la" def test_parse_with_heredoc(self, parser): line = " 1234567890 cat <= 1