unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 1cad42c7a0c94e7a39f6341052e1cf7081e31b5b 770 bytes (raw)
name: packages/patches/tinydir-fix-cbehave-test.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
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);
+}

debug log:

solving 1cad42c7a0c94e7a39f6341052e1cf7081e31b5b ...
found 1cad42c7a0c94e7a39f6341052e1cf7081e31b5b in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).