From 7f311375628a74b12230f6513c34df28747a790f Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 22 Aug 2008 12:52:01 +0000 Subject: [PATCH] PR 9696 svn: r11381 --- collects/drscheme/private/rep.ss | 2 +- collects/tests/drscheme/module-lang-test.ss | 37 ++++++++++----------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/collects/drscheme/private/rep.ss b/collects/drscheme/private/rep.ss index ac391e1251..20dce971b8 100644 --- a/collects/drscheme/private/rep.ss +++ b/collects/drscheme/private/rep.ss @@ -665,7 +665,7 @@ TODO (srcloc-position srcloc) (srcloc-span srcloc))] [(port-name-matches? (srcloc-source srcloc)) - (hash-set! ht (srcloc-source srcloc) definitions-text) + (hash-set! ht (srcloc-source srcloc) this) (make-srcloc this (srcloc-line srcloc) (srcloc-column srcloc) diff --git a/collects/tests/drscheme/module-lang-test.ss b/collects/tests/drscheme/module-lang-test.ss index 0c315057cc..3925b69dbf 100644 --- a/collects/tests/drscheme/module-lang-test.ss +++ b/collects/tests/drscheme/module-lang-test.ss @@ -23,25 +23,6 @@ (/ 888 2) (provide (except-out (all-from-out scheme/base) #%top-interaction)))) -;; this test doesn't pass yet, but the test isn't testing the right thing yet either. -(test @t{#lang scheme - (define-syntax (f stx) - (syntax-case stx () - [(f) - (raise (make-exn:fail:syntax "both" (current-continuation-marks) (list #'f stx)))]))} - @t{(f)} - #<<-- -> (f) -. . both in: - f - (f) --- - #t - #:error-ranges - (λ (defs ints) - (list (make-srcloc defs 3 3 107 1) - (make-srcloc defs 3 2 106 3)))) - (test @t{} #f @rx{Module Language: There must be a valid module @@ -256,6 +237,24 @@ #f "4") +(test @t{#lang scheme + (define-syntax (f stx) + (syntax-case stx () + [(f) + (raise (make-exn:fail:syntax "both" (current-continuation-marks) (list #'f stx)))]))} + @t{(f)} + #<<-- +> (f) +. . both in: + f + (f) +-- + #t + #:error-ranges + (λ (defs ints) + (list (make-srcloc ints 3 3 107 1) + (make-srcloc ints 3 2 106 3)))) + ;; test protection against user-code changing the namespace (test @t{#lang scheme/base (current-namespace (make-base-namespace))}