aboutsummaryrefslogtreecommitdiff
path: root/tests/manifest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manifest')
-rw-r--r--tests/manifest/buildfile6
-rw-r--r--tests/manifest/driver.cxx6
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/manifest/buildfile b/tests/manifest/buildfile
index c417a08..8f4b8f0 100644
--- a/tests/manifest/buildfile
+++ b/tests/manifest/buildfile
@@ -19,7 +19,11 @@ exe{sdriver}: obj{sdriver}
exe{sdriver}: test.roundtrip = signature
obj{pdriver rdriver sdriver}: cxx{driver}
-exe{pdriver rdriver sdriver} obj{pdriver rdriver sdriver}: ../../bpkg/lib{bpkg}
+
+import libs += libbutl%lib{butl}
+
+exe{pdriver rdriver sdriver} obj{pdriver rdriver sdriver}: \
+ ../../bpkg/lib{bpkg} $libs
obj{pdriver}: cxx.poptions += -DTEST_PACKAGES
obj{rdriver}: cxx.poptions += -DTEST_REPOSITORIES
diff --git a/tests/manifest/driver.cxx b/tests/manifest/driver.cxx
index c153477..74e2166 100644
--- a/tests/manifest/driver.cxx
+++ b/tests/manifest/driver.cxx
@@ -2,14 +2,18 @@
// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
+#include <cassert>
#include <fstream>
#include <iostream>
+#include <butl/fdstream> // stdout_mode()
+
#include <bpkg/manifest>
#include <bpkg/manifest-parser>
#include <bpkg/manifest-serializer>
using namespace std;
+using namespace butl;
using namespace bpkg;
int
@@ -37,6 +41,8 @@ main (int argc, char* argv[])
signature_manifest ms (p);
#endif
+
+ stdout_fdmode (fdtranslate::binary); // Write in binary mode.
manifest_serializer s (cout, "stdout");
ms.serialize (s);
}