summaryrefslogtreecommitdiff
path: root/src/testing.c
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-04-05 16:07:39 -0300
committerEuAndreh <eu@euandre.org>2024-04-05 17:08:08 -0300
commitea60b1b08015060a08b1ead38e4e81c44a88017f (patch)
tree9be302cafc856410383e1b1ab315f8b1a371153d /src/testing.c
parentgit mv meta.capim meta.weave (diff)
downloadpindaiba-ea60b1b08015060a08b1ead38e4e81c44a88017f.tar.gz
pindaiba-ea60b1b08015060a08b1ead38e4e81c44a88017f.tar.xz
Move unit tests out of src/*.c into tests/
Diffstat (limited to 'src/testing.c')
-rw-r--r--src/testing.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/testing.c b/src/testing.c
index 028e48f..e8c0fa6 100644
--- a/src/testing.c
+++ b/src/testing.c
@@ -69,46 +69,3 @@ test_ok(void) {
return;
}
-
-#ifdef TEST
-int
-main(void) {
- int rc = 0;
-
- test_start("testing.c");
- const int should_overwrite = 1;
-
- if (unsetenv(ENVVAR_NAME)) {
- perror("unsetenv(\"NO_COLOR\")");
- rc = -1;
- goto out;
- }
- {
- testing("unset NO_COLOR");
- test_ok();
- }
-
- if (setenv(ENVVAR_NAME, "", should_overwrite)) {
- perror("setenv(\"NO_COLOR\", \"\", 1)");
- rc = -1;
- goto out;
- }
- {
- testing("empty NO_COLOR");
- test_ok();
- }
-
- if (setenv(ENVVAR_NAME, "something", should_overwrite)) {
- perror("setenv(\"NO_COLOR\", \"something\", 1)");
- rc = -1;
- goto out;
- }
- {
- testing("defined NO_COLOR");
- test_ok();
- }
-
-out:
- return !!rc;
-}
-#endif