summaryrefslogtreecommitdiff
path: root/tests/testing.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testing.c')
-rw-r--r--tests/testing.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/testing.c b/tests/testing.c
index 65012f9..eeb0a39 100644
--- a/tests/testing.c
+++ b/tests/testing.c
@@ -3,14 +3,13 @@
int
main(void) {
- int rc = 0;
+ int rc = -1;
test_start("testing.c");
const int should_overwrite = 1;
if (unsetenv(ENVVAR_NAME)) {
perror("unsetenv(\"NO_COLOR\")");
- rc = -1;
goto out;
}
{
@@ -20,7 +19,6 @@ main(void) {
if (setenv(ENVVAR_NAME, "", should_overwrite)) {
perror("setenv(\"NO_COLOR\", \"\", 1)");
- rc = -1;
goto out;
}
{
@@ -30,7 +28,6 @@ main(void) {
if (setenv(ENVVAR_NAME, "something", should_overwrite)) {
perror("setenv(\"NO_COLOR\", \"something\", 1)");
- rc = -1;
goto out;
}
{
@@ -38,6 +35,7 @@ main(void) {
test_ok();
}
+ rc = 0;
out:
return !!rc;
}