summaryrefslogtreecommitdiffstats
path: root/tap/tests/ok/ok/test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tap/tests/ok/ok/test.pl')
-rw-r--r--tap/tests/ok/ok/test.pl27
1 files changed, 27 insertions, 0 deletions
diff --git a/tap/tests/ok/ok/test.pl b/tap/tests/ok/ok/test.pl
new file mode 100644
index 0000000..59f4181
--- /dev/null
+++ b/tap/tests/ok/ok/test.pl
@@ -0,0 +1,27 @@
1#!/usr/bin/perl
2
3use warnings;
4use strict;
5
6use Test::More;
7
8my $rc = 0;
9
10$rc = plan tests => 5;
11diag("Returned: " . sprintf("%d", $rc));
12
13
14$rc = ok(1 == 1, '1 equals 1'); # Test ok() passes when it should
15diag("Returned: $rc");
16
17$rc = ok(1 == 1, '1 equals 1'); # Used for %d testing in test.c
18diag("Returned: $rc");
19
20$rc = ok(1 == 1, '1 == 1'); # Test ok1() passes when it should
21diag("Returned: $rc");
22
23$rc = ok(1 == 2, '1 equals 2'); # Test ok() fails when it should
24diag("Returned: $rc");
25
26$rc = ok(1 == 2, '1 == 2'); # Test ok1() fails when it should
27diag("Returned: $rc");