# CSV Parser Test Files This directory contains various test cases for the CSV parser to verify it handles different CSV formats correctly. ## Test Files ### `test.csv` (Basic Test) Simple CSV with header and data rows containing: - Regular unquoted fields - Quoted fields with spaces and commas - Mixed quoted and unquoted fields ### `complex.csv` (Complex Field Content) Tests handling of: - Names with commas and apostrophes - City names with commas and state abbreviations - Mixed international data ### `quotes.csv` (Quote Handling) Tests proper handling of: - Escaped quotes within quoted fields (`""`) - Multi-line field content - Mixed quoted and unquoted fields ### `empty_fields.csv` (Empty Fields) Tests handling of: - Empty fields at start, middle, and end of records - Records with all empty fields - Mixed empty and populated fields ### `header_only.csv` (Header Only) Tests parsing of CSV file with only a header row and no data. ### `empty.csv` (Empty File) Tests parsing of completely empty CSV file. ## Running Tests From the `src` directory, you can test the parser with any of these files: ```bash # Test basic functionality ./csv_parser < ../tests/test.csv # Test complex field handling ./csv_parser < ../tests/complex.csv # Test quote handling ./csv_parser < ../tests/quotes.csv # Test empty field handling ./csv_parser < ../tests/empty_fields.csv # Test header-only files ./csv_parser < ../tests/header_only.csv # Test empty files ./csv_parser < ../tests/empty.csv ``` ## Expected Behavior The parser should successfully parse all test files and display: 1. "Parsing successful!" message 2. Header information (if present) 3. Record information with proper field separation 4. Proper handling of quoted content and escape sequences