Opened 10 years ago

Closed 7 years ago

#6859 closed Bugs (fixed)

Boost.Test eats away last empty command line parameter

Reported by: Pavel Ivanov <paivanof@…> Owned by: Raffi Enficiaud
Milestone: Boost 1.60.0 Component: test
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

If I create a unit test using Boost.Test framework and run it like this:

./unit_test -some_param "" -other_param ""

then after framework initialization I get argc == 4 and argv containing only 3 command line parameters: "-some_param", "" and "-other_param". The last empty parameter gets eaten away. If the last parameters is not empty then everything works normally.

I believe removing check "if (index != argc-1)" from argv_traverser::init in boost/test/utils/runtime/cla/argv_traverser.ipp should fix the problem.

Change History (5)

comment:1 by Gennadiy Rozental, 7 years ago

Milestone: To Be DeterminedBoost 1.60.0
Resolution: fixed
Status: newclosed

This is addressed in trunk and is going to be released with next version of Boost

comment:2 by Raffi Enficiaud, 7 years ago

Resolution: fixed
Status: closedreopened

comment:3 by Raffi Enficiaud, 7 years ago

Owner: changed from Gennadiy Rozental to Raffi Enficiaud
Status: reopenednew

reopening for keeping track of the changes

comment:4 by Raffi Enficiaud, 7 years ago

Status: newassigned

comment:5 by Raffi Enficiaud, 7 years ago

Resolution: fixed
Status: assignedclosed

merged to master

Note: See TracTickets for help on using tickets.