From 68aaff3bcbebfa1753c35e47f24db3f769d51515 Mon Sep 17 00:00:00 2001 From: Akshaj Singhal Date: Thu, 19 Mar 2026 15:52:41 +0530 Subject: [PATCH] Add CLI argument validation tests for shirt (fixes #153) --- shirt/.cs50.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/shirt/.cs50.yml b/shirt/.cs50.yml index 365a73be..97dd21ac 100644 --- a/shirt/.cs50.yml +++ b/shirt/.cs50.yml @@ -3,6 +3,27 @@ submit50: - !exclude "*" - !require shirt.py style: false - + check50: files: *submit50_files + + checks: + - name: "rejects missing output argument" + run: python shirt.py input.png + exit: 1 + + - name: "rejects extra arguments" + run: python shirt.py a.png b.png c.png + exit: 1 + + - name: "rejects non-image input" + run: python shirt.py input.txt output.png + exit: 1 + + - name: "rejects non-image output" + run: python shirt.py input.png output.txt + exit: 1 + + - name: "rejects mismatched extensions" + run: python shirt.py input.jpg output.png + exit: 1