Files
quickbook/test/unit/file_path_to_url_test.cpp
Daniel James 066177a959 Move file_paths_to_url include include_paths.cpp
Which messes up testing. `include_paths.cpp` depends on `quickbook.cpp`
which depends on `program_options`. These kind of problems are mainly
with the use of globals, so I'll need to sort that out sooner or later.
2015-12-20 12:40:58 +00:00

24 lines
820 B
C++

/*=============================================================================
Copyright (c) 2015 Daniel James
Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#include <boost/detail/lightweight_test.hpp>
#include "include_paths.hpp"
int main() {
using boost::filesystem::path;
using quickbook::file_path_to_url;
BOOST_TEST_EQ("a/b", file_path_to_url(path("a/b")));
BOOST_TEST_EQ("../a/b", file_path_to_url(path("../a/b")));
BOOST_TEST_EQ("A%20B%2bC%2520", file_path_to_url(path("A B+C%20")));
// TODO: Windows specific tests.
return boost::report_errors();
}