scribble-enhanced/pkgs/racket-pkgs/racket-test/tests/scribble/xref.rkt
Matthew Flatt b79fa2c540 reorganize into core plus packages
The "racket" directory contains a pared-back version of the
repository, roughly.

The "pkgs" directory everything else in the repository, but
organized into packages.

original commit: b2ebb0a28bf8136e75cd98316c22fe54c30eacb2
2013-06-19 09:01:37 -06:00

19 lines
589 B
Racket

#lang racket/base
(require scribble/xref
racket/fasl
setup/dirs
tests/eli-tester)
;; FIXME: need to look for out<i>.sxref files
(provide xref-tests)
(module+ main (xref-tests))
(define (xref-tests)
(define sxref (build-path (find-doc-dir) "reference" "out.sxref"))
(when (file-exists? sxref)
(define xref
(load-xref (list (λ () (cadr (call-with-input-file* sxref fasl->s-exp))))))
(test (xref-binding->definition-tag
xref (list '(lib "contract.rkt" "racket") '->) #f)
=> '(form ((lib "racket/contract/base.rkt") ->)))))