From bad524ff543a71936b5c3f07b033daff0053f22c Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 7 May 2012 09:11:36 -0400 Subject: [PATCH] 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 --- collects/tests/scribble/xref.rkt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/collects/tests/scribble/xref.rkt b/collects/tests/scribble/xref.rkt index cb8ef79e..2b2b8849 100644 --- a/collects/tests/scribble/xref.rkt +++ b/collects/tests/scribble/xref.rkt @@ -7,13 +7,10 @@ (provide xref-tests) (module+ main (xref-tests)) (define (xref-tests) - (define xref - (load-xref (list - (lambda () - (cadr - (call-with-input-file* - (build-path (find-doc-dir) "reference" "out.sxref") - fasl->s-exp)))))) - (test (xref-binding->definition-tag - xref (list '(lib "contract.rkt" "racket") '->) #f) - => '(form ((lib "racket/contract/base.rkt") ->)))) + (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") ->)))))