
@sorawee if you have realpath
available on your system, you can convert the relative path to an absolute path directly at the command line

raco test ++args $(realpath ./foo/bar.txt) sub/main.rkt

(disclaimer: haven’t actually tested that)

Great solution! I still do hope that there will be a way to do it within Racket, though.

I’m not actually sure there should be. That would mean that whether a test passes or fails can depend on the current directory of the script that calls raco test
, which can wreak havoc with CI systems. It’s good to avoid situations where a test can pass locally but fail in CI, or vice versa.

Yes. There’s no way to find out what a module’s exports map to without having the module.

Maybe there should be a parameter that provides the original directory

While I think this is a good default behavior, there should be an escape hatch. I think about this in the same way as hygienity: by default we should prevent people from shooting themselves in the foot, but if there’s any reason they really want to do that, we should also provide an explicit way to do it.

Hello friends! I’ve a question about Jesse Alama’s book «Server: racket», — does it cover continuations topic? I’m thinking about should I buy it right now or it would be better to not hurry. Continuations in web-dev is the most interesting topic for me now.

Does the realpath
approach count as an escape hatch?
There could still be an in-racket escape hatch, but I don’t personally find this particular use case very compelling on its own.

@dmitryhertz I don’t know the answer to your question, but out of curiosity what sort of web dev are you interested in?

I think if your tests take arguments and need the original directory, you should probably write a module to configure and launch them and run that with racket
instead of raco test
. That’s how most of the db and crypto tests are run, for example.

I think we should expect raco test to work in all situations

I believe it does not, but he’s writing something new about that https://gumroad.com/l/short-intro-web-programming-continuations

I don’t think it’s raco test
that’s not working in that situation, I think it’s a problem with how the test module in question expects users to configure it.

@leif module->exports
now supports an option to report the defined name that implements each provided name.

happy halloween :bat: :bat: :bat: