Docs should explain that the | (OR) operator needs to be escaped on the command line

Bug #1211914 reported by Sara M
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nunit-console
Triaged
Low
Unassigned

Bug Description

I noticed when I use the NUnit Console Runner (NUnit 2.6.2), when I use the nunit-console /run:NUnit_Application.Test.TestClass C:~\NUnit_Application\NUnit_Application.Test\bin\Debug\NUnit_Application.Test.dll /include:A|B. It says, 'B' is not recognized as an internal or external command, operable program or batch file.

The strange thing is my category B works just fine when I run other operators like a comma (,), addition (+) or subtraction (-). It appears to be a problem when I use | operator.

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 1211914] [NEW] When using | (OR) operator in console, the latter category is not recognized

It's more of a documentation bug. The | character represents piping the
output of a program to the shell. So what you typed means "run nunitconsole
with the /include=A option and then send the output to program B. The
message is from the shell telling you that no such program exists. In order
to use | as part of the argument you have to escape it by preceding it with
a caret, like /include A^|B.

So why didn't we put this in the docs? Well, NUnit runs on various
operating systems and we didn't want to clutter the docs with extra info
about each one. Also, we felt that this was basic command line knowledge
that would be fairly well known to everyone. Since you aren't the first
person to run afoul of it, that's probably a false assumption so we'll
update the docs for now.

In the longer term, NUnit 3.0 will have a different syntax for these
expressions.

On Tue, Aug 13, 2013 at 11:13 AM, Sara M <email address hidden> wrote:

> Public bug reported:
>
> I noticed when I use the NUnit Console Runner (NUnit 2.6.2), when I use
> the nunit-console /run:NUnit_Application.Test.TestClass
>
> C:~\NUnit_Application\NUnit_Application.Test\bin\Debug\NUnit_Application.Test.dll
> /include:A|B. It says, 'B' is not recognized as an internal or external
> command, operable program or batch file.
>
> The strange thing is my category B works just fine when I run other
> operators like a comma (,), addition (+) or subtraction (-). It appears
> to be a problem when I use | operator.
>
> ** Affects: nunitv2
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to NUnit
> Extended Testing Platform.
> https://bugs.launchpad.net/bugs/1211914
>
> Title:
> When using | (OR) operator in console, the latter category is not
> recognized
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nunitv2/+bug/1211914/+subscriptions
>

summary: - When using | (OR) operator in console, the latter category is not
- recognized
+ Docs should explain that the | (OR) operator needs to be escaped on the
+ command line
Changed in nunitv2:
status: New → Triaged
importance: Undecided → Low
affects: nunitv2 → nunit-console
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.