diff options
author | EuAndreh <eu@euandre.org> | 2024-04-06 11:37:04 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-04-06 11:37:04 -0300 |
commit | 3b32f5a1abbec9655a93a184ed0a3c5e6e5134fd (patch) | |
tree | 03969b7b76835f2507ccd1a8aeb057bb1d7f7201 /tests/testing.c | |
parent | src/: Remove unused "infallible" tag (diff) | |
download | pindaiba-3b32f5a1abbec9655a93a184ed0a3c5e6e5134fd.tar.gz pindaiba-3b32f5a1abbec9655a93a184ed0a3c5e6e5134fd.tar.xz |
Start "rc = -1" instead of 0
Diffstat (limited to 'tests/testing.c')
-rw-r--r-- | tests/testing.c | 6 |
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; } |