Quickbook: Make windows paths an error in 1.6

[SVN r75267]
This commit is contained in:
Daniel James
2011-11-02 08:50:53 +00:00
parent 4c9d028578
commit 1aede8bf77
4 changed files with 17 additions and 4 deletions

View File

@@ -752,11 +752,14 @@ namespace quickbook
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 @@ namespace quickbook
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, '\\', '/');

View File

@@ -50,6 +50,7 @@ test-suite quickbook.test :
[ 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 ]

View File

@@ -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]

View File

@@ -0,0 +1,5 @@
[article Include fail for windows path.
[quickbook 1.6]
]
[include .\empty.qbk]