blob: 739156ffd781af7c1c7ad761373daa8b651d528e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  | 
#include <uunit.h>
#include <execute.h>
class ExecuteTest
	: public uUnit
{
public:
	ExecuteTest()
	{
		uTEST(ExecuteTest::runit);
	}
	void runit()
	{
		uUNIT_ASSERT_EQUAL(0, execute("/bin/true", {}, {}, false));
		uUNIT_ASSERT_EQUAL(1, execute("/bin/false", {}, {}, false));
		uUNIT_ASSERT_EQUAL(1, execute("no-such-binary", {}, {}, false));
	}
};
// Registers the fixture into the 'registry'
static ExecuteTest test;
  |