From d6e20be32b9c2703ed30bf966bea076360e28c4e Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 7 Aug 2021 01:55:14 -0300 Subject: Add stub src/tar.c --- Makefile | 3 ++- src/tar.c | 15 +++++++++++++++ tests/dev-integration.sh | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/tar.c diff --git a/Makefile b/Makefile index 82da8a8..4c8f424 100644 --- a/Makefile +++ b/Makefile @@ -37,12 +37,13 @@ manpages = $(manpages.in:.in=) all: $(manpages) src/gistatic -check: all src/gistatic.t +check: all src/gistatic.t src/tar.t rm -f tests/resources/repositories/repo-1/.git rm -f tests/resources/repositories/repo-2/.git ln -s .gitdir tests/resources/repositories/repo-1/.git ln -s .gitdir tests/resources/repositories/repo-2/.git ./src/gistatic.t + ./src/tar.t sh tests/integration.sh sh tests/assert-catgets.sh src/gistatic.c diff --git a/src/tar.c b/src/tar.c new file mode 100644 index 0000000..ee94a7d --- /dev/null +++ b/src/tar.c @@ -0,0 +1,15 @@ +#ifdef TEST +#include +#endif + +#ifdef TEST +static void unit_tests() { +} +#endif + +#ifdef TEST +int main(void) { + unit_tests(); + return EXIT_SUCCESS; +} +#endif diff --git a/tests/dev-integration.sh b/tests/dev-integration.sh index ef1898f..b77e579 100755 --- a/tests/dev-integration.sh +++ b/tests/dev-integration.sh @@ -12,6 +12,7 @@ VALGRIND_FLAGS=' --error-exitcode=1 ' +valgrind $VALGRIND_FLAGS ./src/tar.t valgrind $VALGRIND_FLAGS ./src/gistatic.t valgrind $VALGRIND_FLAGS ./src/gistatic -o "$(mkdtemp)" \ -u 'https://example.com' tests/resources/repositories/repo-1 -- cgit v1.2.3