Further investigation reveals that the source code of `compiler/commands/test` is adamant that the only acceptable extensions are 'rkt' and 'scrbl', and that anything else needs to be handled with 'test-command-line-arguments' [1]. So this kind of thing will work in an "info.rkt", with each file added as (list "sourcename.ext" ()):
#lang info (define test-command-line-arguments (list (list "extra-source-1.ext" '()) (list "extra-source-2.ext" '()) ... )) However it doesn't seem possible to, for instance, generate a list of files from `directory-list` and `filter` them, as the functions available within #lang info are a very tiny subset of racket/base. [2] Maybe there's a clever way to circumvent this restriction with a submodule or macro, but so far `raco` detects and rejects my attempts. [1] http://docs.racket-lang.org/raco/test.html#%28part._test-config-info%29 [2] http://docs.racket-lang.org/raco/info_rkt.html?q=info.rkt On Jul 6, 2015, at 11:54 AM, Jack Firth <jackhfi...@gmail.com> wrote: > On Sunday, July 5, 2015 at 4:51:22 PM UTC-7, Matthew Butterick wrote: >> `raco test` will automatically test every .rkt and .scrbl file in a >> directory. Suppose I make `#lang foo` and thus many of my test files end >> with .foo. I would want all .foo files to be automatically tested as well. >> Is there a way to use "info.rkt" to tell `raco test` to add file types? >> (Should there be?) >> >> >> Of course the workaround is just to make a .rkt file that runs the files, >> but it seems like "info.rkt" is the better place (inasmuch as this op is the >> inverse of `test-omit-paths`) > > I've recently run into the inverse, where I'd like to tell raco test to > exclude all files of a particular extension. test-omit-paths lets me exclude > directories and individual files, but not extensions. Perhaps something like > glob-patterns in .gitignore files would be useful? > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.