]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/boost_install/test/iostreams/test_gzip.cpp
2 // Copyright 2019 Peter Dimov.
4 // Distributed under the Boost Software License, Version 1.0.
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
9 #include <boost/iostreams/device/file.hpp>
10 #include <boost/iostreams/filter/gzip.hpp>
11 #include <boost/iostreams/device/back_inserter.hpp>
12 #include <boost/iostreams/copy.hpp>
13 #include <boost/iostreams/compose.hpp>
14 #include <boost/core/lightweight_test.hpp>
16 namespace io
= boost::iostreams
;
20 io::file_source
fs( "test.txt.gz", std::ios_base::binary
);
21 io::gzip_decompressor gz
;
24 io::copy( io::compose( gz
, fs
), io::back_inserter( s
) );
26 BOOST_TEST( s
== "=== reference output ===" );
28 return boost::report_errors();