diff options
Diffstat (limited to 'qpdf/test_driver.cc')
-rw-r--r-- | qpdf/test_driver.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/qpdf/test_driver.cc b/qpdf/test_driver.cc index 3127503a..c7b6a6b4 100644 --- a/qpdf/test_driver.cc +++ b/qpdf/test_driver.cc @@ -10,6 +10,7 @@ #include <qpdf/Pl_Flate.hh> #include <qpdf/QPDFWriter.hh> #include <iostream> +#include <sstream> #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -502,6 +503,22 @@ void runtest(int n, char const* filename) std::cout << "raw stream data okay" << std::endl; } } + else if (n == 12) + { + pdf.setOutputStreams(0, 0); + pdf.showLinearizationData(); + } + else if (n == 13) + { + std::ostringstream out; + std::ostringstream err; + pdf.setOutputStreams(&out, &err); + pdf.showLinearizationData(); + std::cout << "---output---" << std::endl + << out.str() + << "---error---" << std::endl + << err.str(); + } else { throw std::runtime_error(std::string("invalid test ") + |