aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-07-27 18:00:16 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-07-27 18:00:16 +0300
commit822059e4e69547f8e97a1cd219912f55826b0414 (patch)
treedc99f504046fb96b5cc3b1189c3d4107c03f96b7 /tests
parent40426fe405dc795668351cb41bd50d8d08e5b094 (diff)
Rename process_start() and process_run() overloads
Diffstat (limited to 'tests')
-rw-r--r--tests/process-run/driver.cxx16
-rw-r--r--tests/progress/driver.cxx10
2 files changed, 15 insertions, 11 deletions
diff --git a/tests/process-run/driver.cxx b/tests/process-run/driver.cxx
index ff9dd25..695fdb9 100644
--- a/tests/process-run/driver.cxx
+++ b/tests/process-run/driver.cxx
@@ -65,14 +65,14 @@ main (int argc, const char* argv[])
assert (run (0, 1, 2, p));
assert (run (0, 1, 2, p, "-c"));
- process_run ([] (const char* c[], size_t n)
- {
- process::print (cout, c, n);
- cout << endl;
- },
- 0, 1, 2,
- p,
- "-c");
+ process_run_callback ([] (const char* c[], size_t n)
+ {
+ process::print (cout, c, n);
+ cout << endl;
+ },
+ 0, 1, 2,
+ p,
+ "-c");
// Stream conversion and redirection.
//
diff --git a/tests/progress/driver.cxx b/tests/progress/driver.cxx
index 64e84fd..791e485 100644
--- a/tests/progress/driver.cxx
+++ b/tests/progress/driver.cxx
@@ -70,10 +70,14 @@ main (int argc, const char* argv[])
auto print = [] (const string& s)
{
#ifndef _WIN32
- write (stderr_fd(), s.c_str (), s.size ());
+ ssize_t r (write (stderr_fd(), s.c_str (), s.size ()));
#else
- _write (stderr_fd(), s.c_str (), static_cast<unsigned int> (s.size ()));
+ int r (_write (stderr_fd(),
+ s.c_str (),
+ static_cast<unsigned int> (s.size ())));
#endif
+
+ assert (r != -1);
};
for (size_t i (50); i != 0; --i)
@@ -89,7 +93,7 @@ main (int argc, const char* argv[])
// warns about calls ambiguity).
//
process pr (!no_child
- ? process_start (fdnull (), fdnull (), stderr_fd (),
+ ? process_start (fdnull (), fdnull (), 2,
process_env (argv[0]), "-c")
: process (process_exit (0))); // Exited normally.