mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Instead of using the various 'TestOutput', 'TestOutputList' etc macros, it makes better sense to let the tests contain fragments of C code to perform the checks. Several new macros are added: - 'TestResult': This macro takes a C expression which is evaluated to test the result of commands. For example to compare if a string result has some value: TestResult (* command sequence *), "STREQ (ret, \"abcd\")" The variable "ret" contains the result from the last command in the sequence. But also, variables "ret1", "ret2", etc contain the results from the last but one command, the command before that, and so forth, allowing much more flexible tests to be written. - 'TestResultTrue', 'TestResultFalse': Wrappers that test the last command for true/false.
10 KiB
10 KiB