From 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 29 Apr 2024 06:41:38 +0200 Subject: Adding upstream version 1.0.1. Signed-off-by: Daniel Baumann --- test cases/failing test/5 tap tests/meson.build | 9 +++++++++ test cases/failing test/5 tap tests/tester.c | 10 ++++++++++ test cases/failing test/5 tap tests/tester_with_status.c | 8 ++++++++ 3 files changed, 27 insertions(+) create mode 100644 test cases/failing test/5 tap tests/meson.build create mode 100644 test cases/failing test/5 tap tests/tester.c create mode 100644 test cases/failing test/5 tap tests/tester_with_status.c (limited to 'test cases/failing test/5 tap tests') diff --git a/test cases/failing test/5 tap tests/meson.build b/test cases/failing test/5 tap tests/meson.build new file mode 100644 index 0000000..664ac34 --- /dev/null +++ b/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/test cases/failing test/5 tap tests/tester.c b/test cases/failing test/5 tap tests/tester.c new file mode 100644 index 0000000..ac582e7 --- /dev/null +++ b/test cases/failing test/5 tap tests/tester.c @@ -0,0 +1,10 @@ +#include + +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/test cases/failing test/5 tap tests/tester_with_status.c b/test cases/failing test/5 tap tests/tester_with_status.c new file mode 100644 index 0000000..7613afe --- /dev/null +++ b/test cases/failing test/5 tap tests/tester_with_status.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char **argv) { + puts("1..1"); + puts("not ok 1 - some test"); + return 2; +} -- cgit v1.2.3