diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 14:24:53 (GMT) |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 14:24:53 (GMT) |
commit | 00cbf8bcca9d047eead535ebd5bc986365b04426 (patch) | |
tree | c28e5ca52bfe3e8c8ac6bd19e964a5b4650bf426 /tap/tests | |
parent | 87eb2bef1ee2a6a42793437b2f5d63f41b1e1806 (diff) | |
download | monitoring-plugins-00cbf8bcca9d047eead535ebd5bc986365b04426.tar.gz |
tap: clang-formatrefs/pull/2036/head
Diffstat (limited to 'tap/tests')
-rw-r--r-- | tap/tests/diag/test.c | 4 | ||||
-rw-r--r-- | tap/tests/fail/test.c | 4 | ||||
-rw-r--r-- | tap/tests/ok/ok-hash/test.c | 8 | ||||
-rw-r--r-- | tap/tests/ok/ok-numeric/test.c | 4 | ||||
-rw-r--r-- | tap/tests/ok/ok/test.c | 4 | ||||
-rw-r--r-- | tap/tests/pass/test.c | 4 | ||||
-rw-r--r-- | tap/tests/plan/no-tests/test.c | 4 | ||||
-rw-r--r-- | tap/tests/plan/no_plan/test.c | 4 | ||||
-rw-r--r-- | tap/tests/plan/not-enough-tests/test.c | 4 | ||||
-rw-r--r-- | tap/tests/plan/sane/test.c | 4 | ||||
-rw-r--r-- | tap/tests/plan/skip_all/test.c | 4 | ||||
-rw-r--r-- | tap/tests/plan/too-many-plans/test.c | 4 | ||||
-rw-r--r-- | tap/tests/plan/too-many-tests/test.c | 4 | ||||
-rw-r--r-- | tap/tests/skip/test.c | 12 | ||||
-rw-r--r-- | tap/tests/todo/test.c | 6 |
15 files changed, 22 insertions, 52 deletions
diff --git a/tap/tests/diag/test.c b/tap/tests/diag/test.c index 401db64..b0a5a4f 100644 --- a/tap/tests/diag/test.c +++ b/tap/tests/diag/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | plan_tests(2); | 34 | plan_tests(2); |
diff --git a/tap/tests/fail/test.c b/tap/tests/fail/test.c index 621b6c2..18e1695 100644 --- a/tap/tests/fail/test.c +++ b/tap/tests/fail/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | rc = plan_tests(2); | 34 | rc = plan_tests(2); |
diff --git a/tap/tests/ok/ok-hash/test.c b/tap/tests/ok/ok-hash/test.c index 16be137..82f65b0 100644 --- a/tap/tests/ok/ok-hash/test.c +++ b/tap/tests/ok/ok-hash/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | rc = plan_tests(4); | 34 | rc = plan_tests(4); |
@@ -42,11 +40,11 @@ main(int argc, char *argv[]) | |||
42 | rc = ok(1, "Test with one # hash"); | 40 | rc = ok(1, "Test with one # hash"); |
43 | diag("Returned: %d", rc); | 41 | diag("Returned: %d", rc); |
44 | 42 | ||
45 | rc = ok(1, "Test with # two # hashes"); | 43 | rc = ok(1, "Test with # two # hashes"); |
46 | diag("Returned: %d", rc); | 44 | diag("Returned: %d", rc); |
47 | 45 | ||
48 | rc = ok(1, "Test with ## back to back hashes"); | 46 | rc = ok(1, "Test with ## back to back hashes"); |
49 | diag("Returned: %d", rc); | 47 | diag("Returned: %d", rc); |
50 | 48 | ||
51 | return exit_status(); | 49 | return exit_status(); |
52 | } | 50 | } |
diff --git a/tap/tests/ok/ok-numeric/test.c b/tap/tests/ok/ok-numeric/test.c index 0e33a74..46113f4 100644 --- a/tap/tests/ok/ok-numeric/test.c +++ b/tap/tests/ok/ok-numeric/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | rc = plan_tests(3); | 34 | rc = plan_tests(3); |
diff --git a/tap/tests/ok/ok/test.c b/tap/tests/ok/ok/test.c index ae04f2e..8ef0bcd 100644 --- a/tap/tests/ok/ok/test.c +++ b/tap/tests/ok/ok/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | rc = plan_tests(5); | 34 | rc = plan_tests(5); |
diff --git a/tap/tests/pass/test.c b/tap/tests/pass/test.c index 39d8a7c..73df20c 100644 --- a/tap/tests/pass/test.c +++ b/tap/tests/pass/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | rc = plan_tests(2); | 34 | rc = plan_tests(2); |
diff --git a/tap/tests/plan/no-tests/test.c b/tap/tests/plan/no-tests/test.c index 78c5d37..f70ec8d 100644 --- a/tap/tests/plan/no-tests/test.c +++ b/tap/tests/plan/no-tests/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | rc = plan_tests(0); | 34 | rc = plan_tests(0); |
diff --git a/tap/tests/plan/no_plan/test.c b/tap/tests/plan/no_plan/test.c index 5cffbdc..4c25d5f 100644 --- a/tap/tests/plan/no_plan/test.c +++ b/tap/tests/plan/no_plan/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | rc = plan_no_plan(); | 34 | rc = plan_no_plan(); |
diff --git a/tap/tests/plan/not-enough-tests/test.c b/tap/tests/plan/not-enough-tests/test.c index a9ec64f..eacc07e 100644 --- a/tap/tests/plan/not-enough-tests/test.c +++ b/tap/tests/plan/not-enough-tests/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | rc = plan_tests(1); | 34 | rc = plan_tests(1); |
diff --git a/tap/tests/plan/sane/test.c b/tap/tests/plan/sane/test.c index 0843d3a..17bf8d1 100644 --- a/tap/tests/plan/sane/test.c +++ b/tap/tests/plan/sane/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | rc = plan_tests(1); | 34 | rc = plan_tests(1); |
diff --git a/tap/tests/plan/skip_all/test.c b/tap/tests/plan/skip_all/test.c index 31722da..4e37e1a 100644 --- a/tap/tests/plan/skip_all/test.c +++ b/tap/tests/plan/skip_all/test.c | |||
@@ -26,9 +26,7 @@ | |||
26 | 26 | ||
27 | #include "tap.h" | 27 | #include "tap.h" |
28 | 28 | ||
29 | int | 29 | int main(int argc, char *argv[]) { |
30 | main(int argc, char *argv[]) | ||
31 | { | ||
32 | unsigned int rc = 0; | 30 | unsigned int rc = 0; |
33 | 31 | ||
34 | rc = plan_skip_all("No good reason"); | 32 | rc = plan_skip_all("No good reason"); |
diff --git a/tap/tests/plan/too-many-plans/test.c b/tap/tests/plan/too-many-plans/test.c index b189cb7..5f45bc4 100644 --- a/tap/tests/plan/too-many-plans/test.c +++ b/tap/tests/plan/too-many-plans/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | rc = plan_tests(1); | 34 | rc = plan_tests(1); |
diff --git a/tap/tests/plan/too-many-tests/test.c b/tap/tests/plan/too-many-tests/test.c index 0f72410..0b2ee16 100644 --- a/tap/tests/plan/too-many-tests/test.c +++ b/tap/tests/plan/too-many-tests/test.c | |||
@@ -28,9 +28,7 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | 33 | ||
36 | rc = plan_tests(5); | 34 | rc = plan_tests(5); |
diff --git a/tap/tests/skip/test.c b/tap/tests/skip/test.c index d8f3eaf..789812e 100644 --- a/tap/tests/skip/test.c +++ b/tap/tests/skip/test.c | |||
@@ -28,29 +28,27 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | unsigned int side_effect = 0; | 33 | unsigned int side_effect = 0; |
36 | 34 | ||
37 | rc = plan_tests(4); | 35 | rc = plan_tests(4); |
38 | diag("Returned: %d", rc); | 36 | diag("Returned: %d", rc); |
39 | 37 | ||
40 | rc = ok(1 == 1, "1 equals 1"); /* Should always work */ | 38 | rc = ok(1 == 1, "1 equals 1"); /* Should always work */ |
41 | diag("Returned: %d", rc); | 39 | diag("Returned: %d", rc); |
42 | 40 | ||
43 | do { | 41 | do { |
44 | if(1) { | 42 | if (1) { |
45 | rc = skip(1, "Testing skipping"); | 43 | rc = skip(1, "Testing skipping"); |
46 | continue; | 44 | continue; |
47 | } | 45 | } |
48 | 46 | ||
49 | side_effect++; | 47 | side_effect++; |
50 | 48 | ||
51 | ok(side_effect == 1, "side_effect checked out"); | 49 | ok(side_effect == 1, "side_effect checked out"); |
52 | 50 | ||
53 | } while(0); | 51 | } while (0); |
54 | 52 | ||
55 | diag("Returned: %d", rc); | 53 | diag("Returned: %d", rc); |
56 | 54 | ||
diff --git a/tap/tests/todo/test.c b/tap/tests/todo/test.c index ac6339a..0cd2fb3 100644 --- a/tap/tests/todo/test.c +++ b/tap/tests/todo/test.c | |||
@@ -28,16 +28,14 @@ | |||
28 | 28 | ||
29 | #include "tap.h" | 29 | #include "tap.h" |
30 | 30 | ||
31 | int | 31 | int main(int argc, char *argv[]) { |
32 | main(int argc, char *argv[]) | ||
33 | { | ||
34 | unsigned int rc = 0; | 32 | unsigned int rc = 0; |
35 | unsigned int side_effect = 0; | 33 | unsigned int side_effect = 0; |
36 | 34 | ||
37 | rc = plan_tests(5); | 35 | rc = plan_tests(5); |
38 | diag("Returned: %d", rc); | 36 | diag("Returned: %d", rc); |
39 | 37 | ||
40 | rc = ok(1 == 1, "1 equals 1"); /* Should always work */ | 38 | rc = ok(1 == 1, "1 equals 1"); /* Should always work */ |
41 | diag("Returned: %d", rc); | 39 | diag("Returned: %d", rc); |
42 | 40 | ||
43 | todo_start("For testing purposes"); | 41 | todo_start("For testing purposes"); |