Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 6: [PATCH 06/17] feat(wallet): preserve Roots signing and spend controls on v31

src/test/mock_process.cpp

Before: src/test/mock_process.cpp · After: src/test/mock_process.cpp

File metadata
index c9100c9fe0d8f746219c7ddd2a05853b08f011e1..4cb6a571d8733ecb6ac8f05567830a661b473ccc 100644

Download original patch · Release notes

Diff rows 1–23 of 23. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/test/mock_process.cpp CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  #include <boost/test/unit_test.hpp>
6
6
 
7
+ #ifndef WIN32
8
+ #include <fcntl.h>
9
+ #endif
10
+
7
11
  #include <iostream>
8
12
  #include <string>
9
13
 
@@ -37,4 +41,13 @@ BOOST_AUTO_TEST_CASE(pass_stdin_to_stdout, *boost::unit_test::disabled())
37
41
  std::cout << s << std::endl;
38
42
  }
39
43
 
44
+ #ifndef WIN32
45
+ BOOST_AUTO_TEST_CASE(check_inherited_fd, *boost::unit_test::disabled())
46
+ {
47
+ int fd;
48
+ std::cin >> fd;
49
+ std::cout << "{\"inherited\":" << (fcntl(fd, F_GETFD) == -1 ? "false" : "true") << "}";
50
+ }
51
+ #endif
52
+
40
53
  BOOST_AUTO_TEST_SUITE_END()