aboutsummaryrefslogtreecommitdiff
path: root/tests/manifest/driver.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-07-22 12:40:47 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-07-22 12:40:47 +0300
commit915260ad5e0d09eef98b76e294452a9216bc3e14 (patch)
tree581028a5f78d8abbf53f2208c30fbaeb25e1a0ea /tests/manifest/driver.cxx
parentc912e905db13960826542750808c091627996324 (diff)
Adapt to fdstream extension
Diffstat (limited to 'tests/manifest/driver.cxx')
-rw-r--r--tests/manifest/driver.cxx16
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/manifest/driver.cxx b/tests/manifest/driver.cxx
index 74e2166..017b05e 100644
--- a/tests/manifest/driver.cxx
+++ b/tests/manifest/driver.cxx
@@ -3,10 +3,9 @@
// license : MIT; see accompanying LICENSE file
#include <cassert>
-#include <fstream>
#include <iostream>
-#include <butl/fdstream> // stdout_mode()
+#include <butl/fdstream>
#include <bpkg/manifest>
#include <bpkg/manifest-parser>
@@ -27,10 +26,7 @@ main (int argc, char* argv[])
try
{
- ifstream ifs;
- ifs.exceptions (ifstream::badbit | ifstream::failbit);
- ifs.open (argv[1]);
-
+ ifdstream ifs (argv[1]);
manifest_parser p (ifs, argv[1]);
#ifdef TEST_PACKAGES
@@ -41,16 +37,10 @@ main (int argc, char* argv[])
signature_manifest ms (p);
#endif
-
- stdout_fdmode (fdtranslate::binary); // Write in binary mode.
+ stdout_fdmode (fdstream_mode::binary); // Write in binary mode.
manifest_serializer s (cout, "stdout");
ms.serialize (s);
}
- catch (const ios_base::failure&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
catch (const exception& e)
{
cerr << e.what () << endl;