mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-29 07:42:23 -05:00
5a8079e219
* gnu/packages/c.scm (tinydir): Update to 1.2.6. * gnu/packages/patches/tinydir-fix-cbehave-test.patch: Adjust patch. Signed-off-by: Christopher Baines <mail@cbaines.net>
28 lines
770 B
Diff
28 lines
770 B
Diff
Make test work with upstream cbehave
|
|
(tinydir bundles a modified version)
|
|
|
|
diff --git a/tests/file_open_test.c b/tests/file_open_test.c
|
|
index 09b856e..92b13ca 100644
|
|
--- a/tests/file_open_test.c
|
|
+++ b/tests/file_open_test.c
|
|
@@ -4,6 +4,11 @@
|
|
#include "cbehave.h"
|
|
#include "util.h"
|
|
|
|
+#define ASSERT(cond, ret) \
|
|
+if (!(cond)) {\
|
|
+ cbehave_feature_return(__FILE__, __LINE__, ret, _state); \
|
|
+ goto _feature_over; \
|
|
+}\
|
|
|
|
FEATURE(file_open, "File open")
|
|
SCENARIO("Open file in current directory")
|
|
@@ -34,4 +39,7 @@ FEATURE(file_open, "File open")
|
|
SCENARIO_END
|
|
FEATURE_END
|
|
|
|
-CBEHAVE_RUN("File open:", TEST_FEATURE(file_open))
|
|
+int main(void) {
|
|
+ cbehave_feature _cfeatures[] = {{feature_idx(file_open)}};
|
|
+ return cbehave_runner("File open:", _cfeatures);
|
|
+}
|