Boost C++ Libraries: Ticket #3384: Double-quoted arguments including spaces are divided by Boost.Test. https://svn.boost.org/trac10/ticket/3384 <p> The commandline </p> <blockquote class="citation"> <p> test --opt "a b" </p> </blockquote> <p> is parsed as </p> <blockquote class="citation"> <p> test --opt a b </p> </blockquote> <p> . </p> <p> argv_traverser, which re-tokenizes argv, is the culprit. After m_traverser.remainder( argc, argv ) at boost\test\utils\runtime\cla\parser.ipp:(159), the argc increases. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3384 Trac 1.4.3 Shuji Yamasaki <shu@…> Wed, 02 Sep 2009 01:22:42 GMT component changed; owner set https://svn.boost.org/trac10/ticket/3384#comment:1 https://svn.boost.org/trac10/ticket/3384#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Gennadiy Rozental</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">test</span> </li> </ul> Ticket Shuji Yamasaki <shu@…> Sun, 22 Nov 2009 00:27:28 GMT attachment set https://svn.boost.org/trac10/ticket/3384 https://svn.boost.org/trac10/ticket/3384 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">argv_traverser.ipp.patch</span> </li> </ul> <p> patch </p> Ticket Shuji Yamasaki <shu@…> Sun, 22 Nov 2009 00:33:22 GMT summary, version, milestone changed https://svn.boost.org/trac10/ticket/3384#comment:2 https://svn.boost.org/trac10/ticket/3384#comment:2 <ul> <li><strong>summary</strong> <span class="trac-field-old">Double-quoted arguments including spaces can't be used with Boost.Test.</span> → <span class="trac-field-new">Double-quoted arguments including spaces are divided by Boost.Test.</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.40.0</span> → <span class="trac-field-new">Boost 1.41.0</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.41.0</span> → <span class="trac-field-new">Boost 1.42.0</span> </li> </ul> <p> I wrote a test program and fixed the problem, though I don't know whether the problem is really a bug or not. </p> <p> Test Program: </p> <pre class="wiki">#include &lt;boost/test/included/unit_test.hpp&gt; #include &lt;iostream&gt; #include &lt;vector&gt; using namespace std; using namespace boost; using namespace boost::unit_test; test_suite* init_unit_test_suite(int argc, char* argv[]) { cout &lt;&lt; argc - 1 &lt;&lt; endl; for(int i = 1; i &lt; argc; ++i) cout &lt;&lt; argv[i] &lt;&lt; endl; return 0; } </pre><p> Compile it into test.exe and run it as </p> <pre class="wiki">test "first second" </pre><p> , and then you'll get a result such as:<br /> 2<br /> first<br /> second<br /> </p> <p> After patching:<br /> 1<br /> first second<br /> </p> Ticket Gennadiy Rozental Wed, 30 Sep 2015 22:32:44 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/3384#comment:3 https://svn.boost.org/trac10/ticket/3384#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.42.0</span> → <span class="trac-field-new">Boost 1.60.0</span> </li> </ul> <p> This is addressed in trunk and is going to be released with next version of Boost </p> Ticket Raffi Enficiaud Tue, 27 Oct 2015 12:45:45 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/3384#comment:4 https://svn.boost.org/trac10/ticket/3384#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> reopening for keeping track of the change </p> Ticket Raffi Enficiaud Tue, 27 Oct 2015 12:45:51 GMT owner, status changed https://svn.boost.org/trac10/ticket/3384#comment:5 https://svn.boost.org/trac10/ticket/3384#comment:5 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Gennadiy Rozental</span> to <span class="trac-author">Raffi Enficiaud</span> </li> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">new</span> </li> </ul> Ticket Raffi Enficiaud Tue, 27 Oct 2015 12:53:39 GMT status changed https://svn.boost.org/trac10/ticket/3384#comment:6 https://svn.boost.org/trac10/ticket/3384#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Raffi Enficiaud Mon, 02 Nov 2015 10:10:04 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3384#comment:7 https://svn.boost.org/trac10/ticket/3384#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> merged to master </p> Ticket