Question

I can't refer to tests having -> in its names because > symbol is treated as stdout redirection.

Under PowerShell 4.0 I run current stable Leiningen 2.4.2 with parameters being escaped by --%:

PS> lein test :only --% my-project.core/foo->bar

I see only stderr in the console, but as a side-effect I get bar file created with the following content:

lein test user

Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
Was it helpful?

Solution

The problem is in lein.bat file. When %* gets expanded to all arguments passed on line 303, all my escapes are gone. As a temporary solution I see quoting special symbols with a circumflex (^) and then quoting all the circumflexes, which is equal to using ^^^ to make it work:

PS> lein test :only my-project.core/foo-^^^>bar

Looks ugly, but it works. If there's a better solution, I'd prefer that one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top