partial range fix for module scanning and issue #24
This commit is contained in:
parent
d8b5843dbd
commit
f76af72d60
2
info.rkt
2
info.rkt
|
@ -4,7 +4,7 @@
|
|||
(define deps '("base" "errortrace-lib" "rackunit-lib"
|
||||
"syntax-color-lib" "compiler-lib"))
|
||||
(define build-deps
|
||||
'("racket-doc" "scribble-lib" "typed-racket-doc"))
|
||||
'("racket-doc" "scribble-lib" "typed-racket-doc" "htdp-lib"))
|
||||
|
||||
(define raco-commands
|
||||
'(("cover" (submod cover/raco main) "a code coverage tool" 30)))
|
||||
|
|
|
@ -41,7 +41,11 @@
|
|||
(with-input-from-file f
|
||||
(thunk
|
||||
(define lexer
|
||||
((read-language) 'color-lexer racket-lexer))
|
||||
(with-handlers ([exn:fail:read? (const racket-lexer)])
|
||||
(define f (read-language))
|
||||
(if f
|
||||
(f 'color-lexer racket-lexer)
|
||||
racket-lexer)))
|
||||
(define irrelevant? (make-irrelevant? lexer f))
|
||||
(define file-length (string-length (file->string f)))
|
||||
(define cache
|
||||
|
|
|
@ -238,7 +238,9 @@
|
|||
(define (is-covered? e)
|
||||
;; we don't need to look at the span because the coverage is expression based
|
||||
(define p (syntax-position e))
|
||||
(covered? p #:byte? #t))
|
||||
(if p
|
||||
(covered? p #:byte? #t)
|
||||
'missing))
|
||||
|
||||
(define e
|
||||
(with-module-reading-parameterization
|
||||
|
|
10
tests/do-reader.rkt
Normal file
10
tests/do-reader.rkt
Normal file
|
@ -0,0 +1,10 @@
|
|||
#lang racket
|
||||
(require racket/runtime-path "../main.rkt" rackunit "../private/shared.rkt")
|
||||
(define-runtime-path reader.rkt "reader.rkt")
|
||||
(parameterize ([verbose #t])
|
||||
(check-not-exn
|
||||
(thunk
|
||||
(define r (path->string reader.rkt))
|
||||
(test-files! r)
|
||||
(define c (make-covered? (hash-ref (get-test-coverage) r) r))
|
||||
(c 10))))
|
4
tests/reader.rkt
Normal file
4
tests/reader.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
;; The first three lines of this file were inserted by DrRacket. They record metadata
|
||||
;; about the language level of this file in a form that our tools can easily process.
|
||||
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
|
||||
10
|
Loading…
Reference in New Issue
Block a user