Do the xref test only if "doc/reference/out.sxref" exists/

(Since the nightly build includes the documentation only on the main
machine.)

original commit: a4381dd1f62f701227ead8efa6be15d5b950dc7d
This commit is contained in:
Eli Barzilay 2012-05-07 09:11:36 -04:00
parent 36eea932a8
commit bad524ff54

View File

@ -7,13 +7,10 @@
(provide xref-tests) (provide xref-tests)
(module+ main (xref-tests)) (module+ main (xref-tests))
(define (xref-tests) (define (xref-tests)
(define xref (define sxref (build-path (find-doc-dir) "reference" "out.sxref"))
(load-xref (list (when (file-exists? sxref)
(lambda () (define xref
(cadr (load-xref (list (λ() (cadr (call-with-input-file* sxref fasl->s-exp))))))
(call-with-input-file* (test (xref-binding->definition-tag
(build-path (find-doc-dir) "reference" "out.sxref") xref (list '(lib "contract.rkt" "racket") '->) #f)
fasl->s-exp)))))) => '(form ((lib "racket/contract/base.rkt") ->)))))
(test (xref-binding->definition-tag
xref (list '(lib "contract.rkt" "racket") '->) #f)
=> '(form ((lib "racket/contract/base.rkt") ->))))