@@ -68,11 +68,11 @@ refute_output() {
6868@test " validates a valid CSV file successfully" {
6969 check_qsv
7070
71- run just _csv-check " tests/fixtures/valid" " csv"
71+ run just _csv-check " tests/fixtures/valid. csv"
7272
7373 assert_success
74- assert_output --partial " Validating csv files..."
75- assert_output --partial " ✅ All csv files are valid"
74+ assert_output --partial " Validating CSV/TSV files..."
75+ assert_output --partial " ✅ All CSV/TSV files are valid"
7676}
7777
7878@test " fails on invalid CSV file" {
@@ -87,8 +87,7 @@ id,name,age,email
87873,Charlie,35
8888EOF
8989
90- # Pass glob without extension - ext param will add .csv
91- run just _csv-check " ${TEST_TEMP_DIR} /invalid" " csv"
90+ run just _csv-check " ${TEST_TEMP_DIR} /invalid.csv"
9291
9392 assert_failure
9493 assert_output --partial " ❌ Validation failed for: ${temp_invalid} "
@@ -103,21 +102,19 @@ EOF
103102 cp tests/fixtures/valid.csv " $temp_valid1 "
104103 cp tests/fixtures/valid.csv " $temp_valid2 "
105104
106- # Pass glob without extension - ext param will add .csv
107- run just _csv-check " ${TEST_TEMP_DIR} /*" " csv"
105+ run just _csv-check " ${TEST_TEMP_DIR} /*.csv"
108106
109107 assert_success
110- assert_output --partial " ✅ All csv files are valid"
108+ assert_output --partial " ✅ All CSV/TSV files are valid"
111109}
112110
113111@test " skips default ignore patterns (.csv.invalid)" {
114112 check_qsv
115113
116- # Pass glob without extension - ext param will add .csv
117- run just _csv-check " tests/fixtures/*" " csv"
114+ run just _csv-check " tests/fixtures/*.csv"
118115
119116 assert_success
120- assert_output --partial " ✅ All csv files are valid"
117+ assert_output --partial " ✅ All CSV/TSV files are valid"
121118}
122119
123120@test " skips default ignore patterns (.csv.valid)" {
127124 cp tests/fixtures/valid.csv tests/fixtures/test.csv.valid
128125
129126 # The glob tests/fixtures/*.csv won't match .csv.valid files
130- run just _csv-check " tests/fixtures/*" " csv"
127+ run just _csv-check " tests/fixtures/*. csv"
131128
132129 assert_success
133130 refute_output --partial " test.csv.valid"
142139 cp tests/fixtures/valid.csv tests/fixtures/test.validation-errors.csv
143140
144141 # The ignore pattern *validation-errors.csv should filter this out
145- run just _csv-check " tests/fixtures/*" " csv"
142+ run just _csv-check " tests/fixtures/*. csv"
146143
147144 assert_success
148145 refute_output --partial " validation-errors.csv"
154151 check_qsv
155152
156153 # Test with custom ignore pattern that includes custom-ignore.csv
157- # Order: globs, ext, schema, ignore
158- run just _csv-check " tests/fixtures/*" " csv" " " " *custom-ignore.csv"
154+ run just _csv-check " tests/fixtures/*.csv" " " " *custom-ignore.csv"
159155
160156 assert_success
161157 refute_output --partial " custom-ignore.csv"
@@ -164,11 +160,10 @@ EOF
164160@test " handles no files found gracefully" {
165161 check_qsv
166162
167- # Pass glob without extension - ext param will add .csv
168- run just _csv-check " tests/fixtures/nonexistent*" " csv"
163+ run just _csv-check " tests/fixtures/nonexistent*.csv"
169164
170165 assert_success
171- assert_output --partial " ℹ️ No csv files found to validate"
166+ assert_output --partial " ℹ️ No CSV/TSV files found to validate"
172167}
173168
174169@test " validates with schema when provided" {
189184EOF
190185
191186 # Note: This test may skip if qsv doesn't support JSON schema validation
192- # Order: globs, ext, schema, ignore
193- run just _csv-check " tests/fixtures/valid" " csv" " $schema_file "
187+ run just _csv-check " tests/fixtures/valid.csv" " $schema_file "
194188
195189 # Accept both success (validation passed) or specific qsv schema errors
196190 # The schema validation in qsv might work differently
@@ -200,21 +194,19 @@ EOF
200194@test " passes empty schema parameter correctly" {
201195 check_qsv
202196
203- run just _csv-check " tests/fixtures/valid" " csv"
197+ run just _csv-check " tests/fixtures/valid. csv"
204198
205199 assert_success
206200}
207201
208202@test " uses custom extension label" {
209203 check_qsv
210204
211- # Order: globs, ext, schema, ignore
212- # Using csv extension with CUSTOM label to test the label display
213- run just _csv-check " tests/fixtures/valid" " csv"
205+ run just _csv-check " tests/fixtures/valid.csv"
214206
215207 assert_success
216- assert_output --partial " Validating csv files..."
217- assert_output --partial " ✅ All csv files are valid"
208+ assert_output --partial " Validating CSV/TSV files..."
209+ assert_output --partial " ✅ All CSV/TSV files are valid"
218210}
219211
220212# ---------------------------------------------------------------------------
258250EOF
259251
260252 # Validate with schema (this should create the error file)
261- # Order: globs, ext, schema, ignore
262- run just _csv-check " ${TEST_TEMP_DIR} /invalid_schema" " csv" " $schema_file "
253+ run just _csv-check " ${TEST_TEMP_DIR} /invalid_schema.csv" " $schema_file "
263254
264255 # The error file should now exist
265256 [ -f " ${temp_invalid} .validation-errors.tsv" ]
0 commit comments