Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75267 - in branches/quickbook-dev/tools/quickbook: src test
From: dnljms_at_[hidden]
Date: 2011-11-02 04:50:55


Author: danieljames
Date: 2011-11-02 04:50:53 EDT (Wed, 02 Nov 2011)
New Revision: 75267
URL: http://svn.boost.org/trac/boost/changeset/75267

Log:
Quickbook: Make windows paths an error in 1.6
Added:
   branches/quickbook-dev/tools/quickbook/test/include_win_path-1_6-fail.quickbook (contents, props changed)
Text files modified:
   branches/quickbook-dev/tools/quickbook/src/actions.cpp | 13 ++++++++++---
   branches/quickbook-dev/tools/quickbook/test/Jamfile.v2 | 1 +
   branches/quickbook-dev/tools/quickbook/test/include-1_5.quickbook | 2 +-
   3 files changed, 12 insertions(+), 4 deletions(-)

Modified: branches/quickbook-dev/tools/quickbook/src/actions.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/actions.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/actions.cpp 2011-11-02 04:50:53 EDT (Wed, 02 Nov 2011)
@@ -752,11 +752,14 @@
 
         if(fileref.find('\\') != std::string::npos)
         {
- detail::outwarn(attributes["fileref"].get_file(), attributes["fileref"].get_position())
+ (qbk_version_n >= 106u ?
+ detail::outerr(attributes["fileref"].get_file(), attributes["fileref"].get_position()) :
+ detail::outwarn(attributes["fileref"].get_file(), attributes["fileref"].get_position()))
                 << "Image path isn't portable: '"
                 << detail::utf8(fileref)
                 << "'"
                 << std::endl;
+ if (qbk_version_n >= 106u) ++actions.error_count;
         }
 
         boost::replace(fileref, '\\', '/');
@@ -1671,10 +1674,14 @@
 
         if(path_text.find('\\') != std::string::npos)
         {
- detail::outwarn(path.get_file(), path.get_position())
- << "Path isn't portable: "
+ (qbk_version_n >= 106u ?
+ detail::outerr(path.get_file(), path.get_position()) :
+ detail::outwarn(path.get_file(), path.get_position()))
+ << "Path isn't portable: '"
                 << detail::utf8(path_text)
+ << "'"
                 << std::endl;
+ if (qbk_version_n >= 106u) ++actions.error_count;
         }
         
         boost::replace(path_text, '\\', '/');

Modified: branches/quickbook-dev/tools/quickbook/test/Jamfile.v2
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/Jamfile.v2 (original)
+++ branches/quickbook-dev/tools/quickbook/test/Jamfile.v2 2011-11-02 04:50:53 EDT (Wed, 02 Nov 2011)
@@ -50,6 +50,7 @@
     [ quickbook-test include-1_5 ]
     [ quickbook-test include-1_6 ]
     [ quickbook-test include2-1_6 ]
+ [ quickbook-error-test include_win_path-1_6-fail ]
     [ quickbook-test link-1_1 ]
     [ quickbook-test list_test-1_5 ]
     [ quickbook-test macro-1_5 ]

Modified: branches/quickbook-dev/tools/quickbook/test/include-1_5.quickbook
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/include-1_5.quickbook (original)
+++ branches/quickbook-dev/tools/quickbook/test/include-1_5.quickbook 2011-11-02 04:50:53 EDT (Wed, 02 Nov 2011)
@@ -4,7 +4,7 @@
 ]
 
 [include include_sub-1_5.qbk]
-[include include_sub.qbk]
+[include .\include_sub.qbk]
 [include:foo include_sub.qbk]
 [include empty.qbk]
 

Added: branches/quickbook-dev/tools/quickbook/test/include_win_path-1_6-fail.quickbook
==============================================================================
--- (empty file)
+++ branches/quickbook-dev/tools/quickbook/test/include_win_path-1_6-fail.quickbook 2011-11-02 04:50:53 EDT (Wed, 02 Nov 2011)
@@ -0,0 +1,5 @@
+[article Include fail for windows path.
+[quickbook 1.6]
+]
+
+[include .\empty.qbk]


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk