Skip to content

Commit 9ca246f

Browse files
Fix 1 occurrence of let-to-define
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
1 parent e1138a4 commit 9ca246f

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

drracket-test/tests/drracket/private/repl-test.rkt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,21 +1199,21 @@ This produces an ACK message
11991199
(test:run-one (λ () (send (send drr-frame get-break-button) command))))
12001200
(wait-for-drr-frame-computation)
12011201

1202-
(let* ([load-text-end (- (get-int-pos) 1)] ;; subtract one to eliminate newline
1203-
[received-load (fetch-output drr-frame load-text-start load-text-end)])
1204-
1205-
;; check load text
1206-
(next-test)
1207-
(unless (cond
1208-
[(string? load-answer) (string=? load-answer received-load)]
1209-
[(regexp? load-answer) (regexp-match load-answer received-load)]
1210-
[else #f])
1211-
(failure)
1212-
(eprintf "FAILED load test ~a for ~s\n expected: ~s\n got: ~s\n"
1213-
short-filename
1214-
program
1215-
load-answer
1216-
received-load))))
1202+
(define load-text-end (- (get-int-pos) 1)) ;; subtract one to eliminate newline
1203+
(define received-load (fetch-output drr-frame load-text-start load-text-end))
1204+
1205+
;; check load text
1206+
(next-test)
1207+
(unless (cond
1208+
[(string? load-answer) (string=? load-answer received-load)]
1209+
[(regexp? load-answer) (regexp-match load-answer received-load)]
1210+
[else #f])
1211+
(failure)
1212+
(eprintf "FAILED load test ~a for ~s\n expected: ~s\n got: ~s\n"
1213+
short-filename
1214+
program
1215+
load-answer
1216+
received-load)))
12171217
(load-test tmp-load-short-filename (make-load-answer in-vector language-cust #f))
12181218
(when (file-exists? tmp-load3-filename)
12191219
(delete-file tmp-load3-filename))

0 commit comments

Comments
 (0)