[Boost-bugs] [Boost C++ Libraries] #6032: Program options within init_unit_test_suite are incorrect when using path and whitespaces

Subject: [Boost-bugs] [Boost C++ Libraries] #6032: Program options within init_unit_test_suite are incorrect when using path and whitespaces
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-10-18 09:05:45


#6032: Program options within init_unit_test_suite are incorrect when using path
and whitespaces
------------------------------------------+---------------------------------
 Reporter: chriswimmer@… | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: program_options
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: |
------------------------------------------+---------------------------------
 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

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6032>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC