parent
12927d0e8b
commit
db250c4cf9
|
@ -637,8 +637,12 @@
|
||||||
(module paths racket/base
|
(module paths racket/base
|
||||||
(require setup/link
|
(require setup/link
|
||||||
racket/match
|
racket/match
|
||||||
|
setup/collection-name
|
||||||
|
raco/command-name
|
||||||
racket/list)
|
racket/list)
|
||||||
|
|
||||||
|
(define test-exe-name (string->symbol (short-program+command-name)))
|
||||||
|
|
||||||
(struct col (name path) #:transparent)
|
(struct col (name path) #:transparent)
|
||||||
|
|
||||||
(define (get-linked file user? version?)
|
(define (get-linked file user? version?)
|
||||||
|
@ -681,6 +685,8 @@
|
||||||
;; This should be in Racket somewhere and return all the collection
|
;; This should be in Racket somewhere and return all the collection
|
||||||
;; paths, rather than just the first as collection-path does.
|
;; paths, rather than just the first as collection-path does.
|
||||||
(define (collection-paths c)
|
(define (collection-paths c)
|
||||||
|
(when (not (collection-name? c))
|
||||||
|
(error test-exe-name "not a collection name in: ~a" c))
|
||||||
(match-define (list-rest sc more) (map path->string (explode-path c)))
|
(match-define (list-rest sc more) (map path->string (explode-path c)))
|
||||||
(append*
|
(append*
|
||||||
(for/list ([col (all-collections)]
|
(for/list ([col (all-collections)]
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
(define pkg-authors '(mflatt))
|
(define pkg-authors '(mflatt))
|
||||||
(define build-deps '("compiler-lib"
|
(define build-deps '("compiler-lib"
|
||||||
"eli-tester"
|
"eli-tester"
|
||||||
|
"rackunit-lib"
|
||||||
"net-lib"
|
"net-lib"
|
||||||
"scheme-lib"
|
"scheme-lib"
|
||||||
"compatibility-lib"
|
"compatibility-lib"
|
||||||
|
|
5
compiler-test/tests/compiler/commands/test.rkt
Normal file
5
compiler-test/tests/compiler/commands/test.rkt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#lang racket
|
||||||
|
(require rackunit)
|
||||||
|
(require (only-in (submod compiler/commands/test paths) collection-paths))
|
||||||
|
|
||||||
|
(check-exn exn? (lambda () (collection-paths ".")))
|
Loading…
Reference in New Issue
Block a user