]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Support testcase writing in bindings
authorMichael Schroeder <mls@suse.de>
Mon, 3 Aug 2015 09:29:45 +0000 (11:29 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 3 Aug 2015 09:29:45 +0000 (11:29 +0200)
bindings/solv.i

index 1a44e2a23c0d4f9f3ade6c5855415772ad0e646f..a6a46bb846bba5c3892cf32870d82480124ed900 100644 (file)
@@ -603,6 +603,7 @@ typedef int bool;
 #include "repo_autopattern.h"
 #endif
 #include "solv_xfopen.h"
+#include "testcase.h"
 
 /* for old ruby versions */
 #ifndef RARRAY_PTR
@@ -3068,6 +3069,10 @@ rb_eval_string(
       queue_push(&q, i);
     return q;
   }
+
+  bool write_testcase(const char *dir) {
+    return testcase_write($self, dir, TESTCASE_RESULT_TRANSACTION | TESTCASE_RESULT_PROBLEMS, 0, 0);
+  }
 }
 
 %extend Transaction {