I'm a little later than I expected, but I just added the ability to
use regexps in test-omit-paths and in a new info.rkt property called
test-include-paths. The test case [1] shows an example where all files
matching #rx".*include.*" are included, such as the file
`b-include-1.racket-file`. This should be sufficient for you to add
any suffixes/etc you need.

Jay

1. 
https://github.com/racket/compiler/blob/master/compiler-test/tests/compiler/test/extensions/info.rkt

On Thu, Jul 9, 2015 at 5:00 PM, Jay McCarthy <[email protected]> wrote:
> I think the right thing to do is just make an extension for the
> extension and/or the way the file list is built. I'll look into it on
> Monday.
>
> Jay
>
> On Thu, Jul 9, 2015 at 6:53 PM, Matthew Butterick <[email protected]> wrote:
>> 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 <[email protected]> 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 [email protected].
>>> 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 [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Jay McCarthy
> http://jeapostrophe.github.io
>
>            "Wherefore, be not weary in well-doing,
>       for ye are laying the foundation of a great work.
> And out of small things proceedeth that which is great."
>                           - D&C 64:33



-- 
Jay McCarthy
http://jeapostrophe.github.io

           "Wherefore, be not weary in well-doing,
      for ye are laying the foundation of a great work.
And out of small things proceedeth that which is great."
                          - D&C 64:33

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to