Opened 11 years ago

Closed 7 years ago

#6032 closed Bugs (fixed)

Program options within init_unit_test_suite are incorrect when using path and whitespaces

Reported by: chriswimmer@… Owned by: Raffi Enficiaud
Milestone: Boost 1.60.0 Component: test
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc: gladitz@…

Description

Hi,

I use the component program options and unit tests of boost 1.47 on Windows.

When running a unit test I have to check for some additional options (other than the boost options). So I use test_suite* init_unit_test_suite( int argc, char* argv[] ) An option may look like this

-W "$(OutDir)"

and OutDir may contain any path with whitespaces. However, the function init_unit_test_suite receives an incorrect number of arguments in argc. I guess that boost unit test also parses options with program_options so I guess program options may be the problem. However, it could also be the unit test component, I guess.

So the given arguments above (-W ...) produces argc = 4:

argv[0] = exe path

argv[1] = -W

argv[2] = First half of the path with whitespace

argv[3] = Second half of the path with whitespace

However, argv 2 and 3 should be in the same position.

THX

Change History (8)

comment:1 by Vladimir Prus, 11 years ago

Component: program_optionstest
Owner: changed from Vladimir Prus to Gennadiy Rozental

Boost.Test has it's own command-line parsing library, so I am reassigning this issue.

comment:2 by chriswimmer@…, 11 years ago

Interesting that they use their own implementation. Wasn't it tested by unit tests? :)

comment:3 by Nils Gladitz <gladitz@…>, 11 years ago

Cc: gladitz@… added

comment:4 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:5 by Raffi Enficiaud, 7 years ago

Resolution: fixed
Status: closedreopened

reopened for keeping track of the change

comment:6 by Raffi Enficiaud, 7 years ago

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

comment:7 by Raffi Enficiaud, 7 years ago

Status: newassigned

comment:8 by Raffi Enficiaud, 7 years ago

Resolution: fixed
Status: assignedclosed

merged to master

Note: See TracTickets for help on using tickets.