Combine the functionality of jq and jq_test
One binary is much simpler. ./jq --run-tests now runs the tests.
This commit is contained in:
1 parent
47e015e946
commit
a49402c53a
3 files changed
+11
-4
No files matched your search
@@ -11,6 +11,8 @@
|
||||
#include "jv_alloc.h"
|
||||
#include "version.gen.h"
|
||||
|
||||
int jq_testsuite(int argc, char* argv[]);
|
||||
|
||||
static const char* progname;
|
||||
|
||||
static void usage() {
|
||||
@@ -140,6 +142,10 @@ static int read_more(char* buf, size_t size) {
|
||||
int main(int argc, char* argv[]) {
|
||||
if (argc) progname = argv[0];
|
||||
|
||||
if (argc > 1 && !strcmp(argv[1], "--run-tests")) {
|
||||
return jq_testsuite(argc - 1, argv + 1);
|
||||
}
|
||||
|
||||
const char* program = 0;
|
||||
input_filenames = jv_mem_alloc(sizeof(const char*) * argc);
|
||||
ninput_files = 0;
|
||||
|
||||
Reference in new issue
Block a user