aboutsummaryrefslogtreecommitdiff
path: root/tests/manifest
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-05-21 17:16:13 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-05-31 19:04:33 +0300
commit9a1351808c7443a65f876d2b7808ebdea7d9c814 (patch)
tree80fedb517a43c64762bb71fa690c90a40824be33 /tests/manifest
parent057a5d5d435d53166d1b8751748a9ba0a317bee3 (diff)
Port to MinGW
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);
}