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: | 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 , 11 years ago
Component: | program_options → test |
---|---|
Owner: | changed from | to
comment:2 by , 11 years ago
Interesting that they use their own implementation. Wasn't it tested by unit tests? :)
comment:3 by , 11 years ago
Cc: | added |
---|
comment:4 by , 7 years ago
Milestone: | To Be Determined → Boost 1.60.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
This is addressed in trunk and is going to be released with next version of Boost
comment:5 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
reopened for keeping track of the change
comment:6 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:7 by , 7 years ago
Status: | new → assigned |
---|
Boost.Test has it's own command-line parsing library, so I am reassigning this issue.