test-require-d.rkt (573B)
1 #lang racket 2 3 ;; Baz is a chimera created by mixing foo's identifier macro and bar's 4 ;; match expander. Note that performing a plain rename-in on a polysemic 5 ;; identifier would be a recipe for disaster (it would try to access meanings 6 ;; based on its new name, instead of accessing meanings based on its former 7 ;; name). 8 9 (require rackunit) 10 11 (require "test-require.rkt") 12 13 (check-equal? baz "originally foo") 14 15 (check-match "originally bar match-expander" (baz)) 16 17 (check-equal? (match "something else" 18 [(baz) 'bad] 19 [_ 'ok]) 20 'ok)