From d7c5652c1fcfced000ed423a956538eca4991b33 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 28 Jun 2019 13:14:49 -0700 Subject: [PATCH] move tests --- greatest.h => tests/greatest.h | 0 test.c => tests/test.c | 0 test_subject.c => tests/test_subject.c | 0 testall => tests/testall | 7 +++++-- 4 files changed, 5 insertions(+), 2 deletions(-) rename greatest.h => tests/greatest.h (100%) rename test.c => tests/test.c (100%) rename test_subject.c => tests/test_subject.c (100%) rename testall => tests/testall (74%) diff --git a/greatest.h b/tests/greatest.h similarity index 100% rename from greatest.h rename to tests/greatest.h diff --git a/test.c b/tests/test.c similarity index 100% rename from test.c rename to tests/test.c diff --git a/test_subject.c b/tests/test_subject.c similarity index 100% rename from test_subject.c rename to tests/test_subject.c diff --git a/testall b/tests/testall similarity index 74% rename from testall rename to tests/testall index d6a9d59..a784f64 100644 --- a/testall +++ b/tests/testall @@ -4,6 +4,9 @@ set -e CC=${CC:-gcc} +TEST_DIR="$(readlink -f "$(dirname "$0")")" +cd "$TEST_DIR" + # ensure all tests are queued to run. awk ' /^TEST/ { @@ -31,6 +34,6 @@ END { } ' test.c -$CC -std=c99 -Wall -Wextra -Wno-unused -Werror $CFLAGS test_subject.c -o test_subject -$CC -std=c99 -Wall -Wextra -Wno-unused -Werror $CFLAGS test.c -o test +$CC -std=c99 -I.. -Wall -Wextra -Wno-unused -Werror $CFLAGS test_subject.c -o test_subject +$CC -std=c99 -I.. -Wall -Wextra -Wno-unused -Werror $CFLAGS test.c -o test ./test