mirror of
https://github.com/boostorg/quickbook.git
synced 2026-01-25 18:32:25 +00:00
Quickbook: Make windows paths an error in 1.6
[SVN r75267]
This commit is contained in:
@@ -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, '\\', '/');
|
||||
|
||||
@@ -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 ]
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
5
test/include_win_path-1_6-fail.quickbook
Normal file
5
test/include_win_path-1_6-fail.quickbook
Normal file
@@ -0,0 +1,5 @@
|
||||
[article Include fail for windows path.
|
||||
[quickbook 1.6]
|
||||
]
|
||||
|
||||
[include .\empty.qbk]
|
||||
Reference in New Issue
Block a user