Skip to content

Commit 528bbde

Browse files
Copilotjackfirth
andcommitted
Fix typo in help text and improve test robustness
Co-authored-by: jackfirth <[email protected]>
1 parent cbc30f9 commit 528bbde

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

cli.rkt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
("--directory"
7777
dirpath
78-
"A directory to anaylze, including subdirectories."
78+
"A directory to analyze, including subdirectories."
7979
(vector-builder-add targets (directory-file-group dirpath)))
8080

8181
("--package"
@@ -760,10 +760,13 @@ For help on these, use 'analyze --help' or 'fix --help'."
760760
(list "--file" (path->string test-file)
761761
"--max-fixes" "1")))))))
762762

763-
;; Check that output mentions only 1 fix
764-
(check-true (or (string-contains? output "1 issue")
765-
(string-contains? output "Fixed 1"))
766-
"Output should indicate 1 fix was applied")
763+
;; Check that only one of the two issues was fixed
764+
(define fixed-content (file->string test-file))
765+
(define fixed-or? (string-contains? fixed-content "(or 1 2 3)"))
766+
(define fixed-and? (string-contains? fixed-content "(and 4 5 6)"))
767+
(check-true (or (and fixed-or? (not fixed-and?))
768+
(and (not fixed-or?) fixed-and?))
769+
"Exactly one of the two issues should be fixed due to --max-fixes 1")
767770

768771
(delete-directory/files test-dir))
769772

0 commit comments

Comments
 (0)