Skip to content

Commit a9b5f70

Browse files
committed
Add tests
1 parent dbc025d commit a9b5f70

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

drracket-test/tests/drracket/syncheck-test.rkt

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
(define-struct test (line input expected arrows tooltips setup teardown extra-files extra-info?)
3232
#:transparent)
3333
(define-struct (dir-test test) () #:transparent)
34-
34+
35+
;; When either `new-name` or `output` is `#f`, only test that `old-name` is on the menu
3536
(define-struct rename-test (line input pos old-name new-name output) #:transparent)
3637
(define-struct prefix-test (line input pos prefix output) #:transparent)
3738

@@ -1547,6 +1548,24 @@
15471548
" y`1\n"
15481549
" `2)\n"))
15491550

1551+
(build-rename-test
1552+
(string-append
1553+
"#lang racket\n"
1554+
"(require racket/list)\n")
1555+
14
1556+
"require"
1557+
#f
1558+
#f)
1559+
1560+
(build-rename-test
1561+
(string-append
1562+
"#lang racket\n"
1563+
"(require racket/list)\n")
1564+
20
1565+
"require"
1566+
#f
1567+
#f)
1568+
15501569
(build-test
15511570
#:extra-files
15521571
(hash "define-suffix.rkt"
@@ -1766,7 +1785,7 @@
17661785
(map (λ (x) (and (is-a? x labelled-menu-item<%>) (send x get-label)))
17671786
(send menu get-items)))
17681787
#f]))))
1769-
(when menu-item
1788+
(when (and menu-item (rename-test-new-name test) (rename-test-output test))
17701789
(queue-callback (λ () (send menu-item command (make-object control-event% 'menu))))
17711790
(wait-for-new-frame drs)
17721791
(for ([x (in-string (rename-test-new-name test))])

0 commit comments

Comments
 (0)