summaryrefslogtreecommitdiffstats
path: root/test cases/failing test/5 tap tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/failing test/5 tap tests
parentInitial commit. (diff)
downloadmeson-upstream/1.0.1.tar.xz
meson-upstream/1.0.1.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/failing test/5 tap tests')
-rw-r--r--test cases/failing test/5 tap tests/meson.build9
-rw-r--r--test cases/failing test/5 tap tests/tester.c10
-rw-r--r--test cases/failing test/5 tap tests/tester_with_status.c8
3 files changed, 27 insertions, 0 deletions
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 <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/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 <stdio.h>
+#include <stdlib.h>
+
+int main(int argc, char **argv) {
+ puts("1..1");
+ puts("not ok 1 - some test");
+ return 2;
+}