diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/failing test/5 tap tests | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/failing test/5 tap tests')
3 files changed, 27 insertions, 0 deletions
diff --git a/meson/test cases/failing test/5 tap tests/meson.build b/meson/test cases/failing test/5 tap tests/meson.build new file mode 100644 index 000000000..664ac34d2 --- /dev/null +++ b/meson/test cases/failing test/5 tap tests/meson.build @@ -0,0 +1,9 @@ +project('test features', 'c') + +tester = executable('tester', 'tester.c') +test_with_status = executable('test-with-status', 'tester_with_status.c') +test('nonzero return code no tests', tester, args : [], protocol: 'tap') +test('nonzero return code with tests', test_with_status, protocol: 'tap') +test('missing test', tester, args : ['1..1'], protocol: 'tap') +test('incorrect skip', tester, args : ['1..1 # skip\nok 1'], protocol: 'tap') +test('partially skipped', tester, args : ['not ok 1\nok 2 # skip'], protocol: 'tap') diff --git a/meson/test cases/failing test/5 tap tests/tester.c b/meson/test cases/failing test/5 tap tests/tester.c new file mode 100644 index 000000000..ac582e7c0 --- /dev/null +++ b/meson/test cases/failing test/5 tap tests/tester.c @@ -0,0 +1,10 @@ +#include <stdio.h> + +int main(int argc, char **argv) { + if (argc != 2) { + fprintf(stderr, "Incorrect number of arguments, got %i\n", argc); + return 1; + } + puts(argv[1]); + return 0; +} diff --git a/meson/test cases/failing test/5 tap tests/tester_with_status.c b/meson/test cases/failing test/5 tap tests/tester_with_status.c new file mode 100644 index 000000000..7613afefc --- /dev/null +++ b/meson/test cases/failing test/5 tap tests/tester_with_status.c @@ -0,0 +1,8 @@ +#include <stdio.h> +#include <stdlib.h> + +int main(int argc, char **argv) { + puts("1..1"); + puts("not ok 1 - some test"); + return 2; +} |