diff options
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | src/tar.c | 15 | ||||
-rwxr-xr-x | tests/dev-integration.sh | 1 |
3 files changed, 18 insertions, 1 deletions
@@ -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 <stdlib.h> +#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 |