Skip to content

Commit 135d5c9

Browse files
committed
fix another bug in 459669f
1 parent 3064ae4 commit 135d5c9

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

drracket-tool-test/tests/check-syntax/syncheck-direct.rkt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,33 @@
929929
(add-syntax (expand stx))
930930
(done)))
931931

932+
;; ensure that the submodules argument gets correctly sent along
933+
;; in a syncheck:add-jump-to-definition/phase-level+space call
934+
(let ()
935+
(define root-dir (make-temporary-file "test-from-syncheck-direct-rkt~a" 'directory))
936+
(define src (build-path root-dir "a.rkt"))
937+
(call-with-output-file src
938+
(λ (port)
939+
(displayln "#lang racket/base\n" port)
940+
(writeln '(require (submod "b.rkt" the-mod)) port)
941+
(writeln 'the-name port)))
942+
(call-with-output-file (build-path root-dir "b.rkt")
943+
(λ (port)
944+
(displayln "#lang racket/base\n" port)
945+
(writeln '(module the-mod racket (provide the-name) (define the-name 1)) port)))
946+
947+
(define content
948+
(parameterize ([current-directory root-dir])
949+
(show-content "a.rkt")))
950+
951+
(check-true
952+
(for/or ([item (in-list content)])
953+
(match item
954+
[(vector 'syncheck:add-jump-to-definition/phase-level+space _ _ 'the-name _ '(the-mod) _)
955+
#t]
956+
[_ #f])))
957+
(delete-directory/files root-dir))
958+
932959
;; make sure that `make-traversal` is called with
933960
;; the containing directory by `show-content`
934961
(let ()

drracket-tool-text-lib/drracket/private/syncheck/traversals.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@
12741274
pos-right
12751275
id
12761276
filename
1277-
(map submodule-name submods)
1277+
submods
12781278
phase-level+space)))))
12791279

12801280
;; annotate-require-open : namespace string -> (stx -> void)

0 commit comments

Comments
 (0)