
@mflatt are there any tests defined for various raco commands like raco make, raco test, raco pkg etc? I’m trying create unit tests for a raco command I’ve created but am finding it tricky since the main way to invoke a raco command programmatically seems to be dynamic-require
ing the module but dynamic-require
won’t reload the module if its already been required in a test-case
earlier in the file.
I’m wondering if the right approach is to create a fresh namespace for each test-case
and dynamic-require
ing the raco command into that namespace. Not sure what’s the most effective way to unit test a raco command.

@abmclin The raco exe
tests are in “pkgs/compiler-test/tests/compiler/embed/test.rkt”, and you’ll see that those use system*
. The raco pkg
tests do, too, with a more sophisticated harness. But using dynamic-require
in a fresh namespace seems like a better idea.

thanks! I’ll go check those tests out

using the fresh namespace approach works very well but an argument can be made that using system*
captures the natural way a raco command would be invoked so it’s debatable whether one or the other is better.

Does scale/improve-new-text
still do anything different than scale
?

I ask because the example in the docs look exactly the same to me, and when I try to make an example that would make it extremely obvious, it still looks exactly the same:


It depends on the graphics library, but I don’t know whether there are any left where scale/improve-new-text
still improves new text.

AH, okay.

I guess I only tried it on macosx and linux builds.

Kind of interesting that that would make a difference, thanks. :slightly_smiling_face: