From f70206b668baa20519f2026a7b2b8d75ebe7d2cd Mon Sep 17 00:00:00 2001 From: Bonson Wong Date: Fri, 17 Nov 2023 14:18:08 +1100 Subject: [PATCH] added version info --- src/s5curl.c | 2 +- src_tool/main.c | 3 +++ test/data/out/text.txt | 10 ---------- test/test.sh | 5 +++++ 4 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 test/data/out/text.txt diff --git a/src/s5curl.c b/src/s5curl.c index 3fd7b0f..0ae7359 100644 --- a/src/s5curl.c +++ b/src/s5curl.c @@ -254,7 +254,7 @@ static s5curl_t *s5curl_open_with( return NULL; } if (fseek(fp, 0, SEEK_SET)) { - SLOW5_ERROR("%s", "Failed to rewind index file ptr"); + SLOW5_ERROR("%s", "Failed to rewind index file ptr."); s5curl_errno = S5CURL_ERR_IO; return NULL; } diff --git a/src_tool/main.c b/src_tool/main.c index 4a6e17c..6fe7736 100644 --- a/src_tool/main.c +++ b/src_tool/main.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "error.h" #include "cmd.h" #include "misc.h" @@ -145,6 +146,8 @@ int main(const int argc, char **argv){ case 'V': DEBUG("displaying version information%s",""); fprintf(stdout, "slow5curl %s\n", SLOW5CURL_VERSION); + fprintf(stdout, " using slow5lib %s\n", SLOW5_LIB_VERSION); + fprintf(stdout, " using libcurl %s\n", curl_version_info(CURLVERSION_NOW)->version); ret = EXIT_SUCCESS; break_flag = true; break; diff --git a/test/data/out/text.txt b/test/data/out/text.txt deleted file mode 100644 index 35d3307..0000000 --- a/test/data/out/text.txt +++ /dev/null @@ -1,10 +0,0 @@ -00002194-fea5-433c-ba89-1eb6b60f0f28 -00013808-f7cb-4c36-8cdd-265aba0a7487 -0001960d-c143-4faf-bf20-753b9041812a -0001c9f9-29f8-4e72-b2f8-d291273baea6 -00027dc0-458e-4153-ba46-2fb030aa34b8 -000286ab-1f80-40e3-a778-8d89e4e52940 -0003c949-8c33-4287-babd-eee408525dea -0003d6d3-45c5-4ffd-96ee-ebc3a8ed7698 -00040c8f-ca80-4282-8de9-be5aa25fce1d -00049d1a-a957-472b-a1a1-86e4dac6c568 diff --git a/test/test.sh b/test/test.sh index 45c0314..89f36f5 100755 --- a/test/test.sh +++ b/test/test.sh @@ -38,6 +38,11 @@ echo_test_name() { test -d ${OUT} && rm -r ${OUT} mkdir ${OUT} || die "mkdir failed" +# version +TESTCASE_NAME="version" +echo_test_name ${TESTCASE_NAME} +ex ./slow5curl --version + # cache opt TESTCASE_NAME="get_cached" echo_test_name ${TESTCASE_NAME}