ARB
Classes | Macros
command_output.h File Reference
#include <arb_file.h>
#include <arbdbt.h>
#include <ut_valgrinded.h>
#include <unistd.h>
Include dependency graph for command_output.h:

Go to the source code of this file.

Classes

class  CommandOutput
 

Macros

#define TEST_OUTPUT_EQUALS(cmd, expected_std, expected_err)
 
#define TEST_OUTPUT_EQUALS__BROKEN(cmd, expected_std, expected_err)
 
#define TEST_OUTPUT_CONTAINS(cmd, expected_std, expected_err)
 
#define TEST_OUTPUT_CONTAINS__BROKEN(cmd, expected_std, expected_err)
 
#define TEST_FAILURE_OUTPUT_CONTAINS(cmd, expected_std, expected_err)
 
#define TEST_FAILURE_OUTPUT_CONTAINS__BROKEN(cmd, expected_std, expected_err)
 
#define TEST_OUTPUT_HAS_CHECKSUM(cmd, checksum)   TEST_EXPECTATION (CommandOutput(cmd, false).has_checksum(checksum))
 
#define TEST_OUTPUT_HAS_CHECKSUM__BROKEN(cmd, checksum)   TEST_EXPECTATION__BROKEN_SIMPLE(CommandOutput(cmd, false).has_checksum(checksum))
 
#define TEST_STDOUT_EQUALS(cmd, expected_std)   TEST_OUTPUT_EQUALS(cmd, expected_std, (const char *)NULp)
 
#define TEST_STDERR_EQUALS(cmd, expected_err)   TEST_OUTPUT_EQUALS(cmd, (const char *)NULp, expected_err)
 
#define TEST_STDOUT_CONTAINS(cmd, part)   TEST_OUTPUT_CONTAINS(cmd, part, (const char *)NULp)
 
#define TEST_STDERR_CONTAINS(cmd, part)   TEST_OUTPUT_CONTAINS(cmd, (const char *)NULp, part)
 

Macro Definition Documentation

#define TEST_OUTPUT_EQUALS (   cmd,
  expected_std,
  expected_err 
)
Value:
do { \
bool try_valgrind = false; \
TEST_EXPECTATION(CommandOutput(cmd, try_valgrind).Equals(expected_std, expected_err)); \
} while(0)
#define TEST_EXPECTATION(EXPCTN)
Definition: test_unit.h:1037

Definition at line 136 of file command_output.h.

#define TEST_OUTPUT_EQUALS__BROKEN (   cmd,
  expected_std,
  expected_err 
)
Value:
do { \
bool try_valgrind = false; \
TEST_EXPECTATION__BROKEN_SIMPLE(CommandOutput(cmd, try_valgrind).Equals(expected_std, expected_err)); \
} while(0)
#define TEST_EXPECTATION__BROKEN_SIMPLE(EXPCTN)
Definition: test_unit.h:1038

Definition at line 142 of file command_output.h.

#define TEST_OUTPUT_CONTAINS (   cmd,
  expected_std,
  expected_err 
)
Value:
do { \
bool try_valgrind = false; \
TEST_EXPECTATION(CommandOutput(cmd, try_valgrind).Contains(expected_std, expected_err)); \
} while(0)
#define TEST_EXPECTATION(EXPCTN)
Definition: test_unit.h:1037

Definition at line 148 of file command_output.h.

#define TEST_OUTPUT_CONTAINS__BROKEN (   cmd,
  expected_std,
  expected_err 
)
Value:
do { \
bool try_valgrind = false; \
TEST_EXPECTATION__BROKEN_SIMPLE(CommandOutput(cmd, try_valgrind).Contains(expected_std, expected_err)); \
} while(0)
#define TEST_EXPECTATION__BROKEN_SIMPLE(EXPCTN)
Definition: test_unit.h:1038

Definition at line 154 of file command_output.h.

#define TEST_FAILURE_OUTPUT_CONTAINS (   cmd,
  expected_std,
  expected_err 
)
Value:
do { \
TEST_EXPECTATION(CommandOutput(cmd, false, true).Contains(expected_std, expected_err)); \
} while(0)
#define TEST_EXPECTATION(EXPCTN)
Definition: test_unit.h:1037

Definition at line 160 of file command_output.h.

#define TEST_FAILURE_OUTPUT_CONTAINS__BROKEN (   cmd,
  expected_std,
  expected_err 
)
Value:
do { \
TEST_EXPECTATION__BROKEN_SIMPLE(CommandOutput(cmd, false, true).Contains(expected_std, expected_err)); \
} while(0)
#define TEST_EXPECTATION__BROKEN_SIMPLE(EXPCTN)
Definition: test_unit.h:1038

Definition at line 165 of file command_output.h.

#define TEST_OUTPUT_HAS_CHECKSUM (   cmd,
  checksum 
)    TEST_EXPECTATION (CommandOutput(cmd, false).has_checksum(checksum))

Definition at line 171 of file command_output.h.

#define TEST_OUTPUT_HAS_CHECKSUM__BROKEN (   cmd,
  checksum 
)    TEST_EXPECTATION__BROKEN_SIMPLE(CommandOutput(cmd, false).has_checksum(checksum))

Definition at line 172 of file command_output.h.

#define TEST_STDOUT_EQUALS (   cmd,
  expected_std 
)    TEST_OUTPUT_EQUALS(cmd, expected_std, (const char *)NULp)

Definition at line 174 of file command_output.h.

#define TEST_STDERR_EQUALS (   cmd,
  expected_err 
)    TEST_OUTPUT_EQUALS(cmd, (const char *)NULp, expected_err)

Definition at line 175 of file command_output.h.

#define TEST_STDOUT_CONTAINS (   cmd,
  part 
)    TEST_OUTPUT_CONTAINS(cmd, part, (const char *)NULp)

Definition at line 177 of file command_output.h.

#define TEST_STDERR_CONTAINS (   cmd,
  part 
)    TEST_OUTPUT_CONTAINS(cmd, (const char *)NULp, part)

Definition at line 178 of file command_output.h.