summaryrefslogtreecommitdiffstats
path: root/jq_test.c
diff options
context:
space:
mode:
authorStephen Dolan <mu@netsoc.tcd.ie>2013-05-05 22:53:45 +0100
committerStephen Dolan <mu@netsoc.tcd.ie>2013-05-05 22:59:53 +0100
commita49402c53a99e6ab58c20921c80603d777666db4 (patch)
tree5352bfaf07bb18e907f0579ac5c38f83fa303391 /jq_test.c
parent47e015e9468ce109c0fb28562d2b768ba29d2de3 (diff)
Combine the functionality of jq and jq_test
One binary is much simpler. ./jq --run-tests now runs the tests.
Diffstat (limited to 'jq_test.c')
-rw-r--r--jq_test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/jq_test.c b/jq_test.c
index 8b5ee2c2..cbcbd8f5 100644
--- a/jq_test.c
+++ b/jq_test.c
@@ -10,7 +10,7 @@ static void run_jq_tests();
FILE* testdata;
-int main(int argc, char* argv[]) {
+int jq_testsuite(int argc, char* argv[]) {
jv_test();
if (argc == 1) {
testdata = fopen("testdata", "r");
@@ -26,6 +26,7 @@ int main(int argc, char* argv[]) {
}
run_jq_tests();
if (testdata != stdin) fclose(testdata);
+ return 0;
}