summaryrefslogtreecommitdiffstats
path: root/tap/tests/ok/ok/test.pl
blob: 59f418192508512bbdad2211c88c2a97267b2b50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl

use warnings;
use strict;

use Test::More;

my $rc = 0;

$rc = plan tests => 5;
diag("Returned: " . sprintf("%d", $rc));


$rc = ok(1 == 1, '1 equals 1');	# Test ok() passes when it should
diag("Returned: $rc");

$rc = ok(1 == 1, '1 equals 1'); # Used for %d testing in test.c
diag("Returned: $rc");

$rc = ok(1 == 1, '1 == 1');	# Test ok1() passes when it should
diag("Returned: $rc");

$rc = ok(1 == 2, '1 equals 2');	# Test ok() fails when it should
diag("Returned: $rc");

$rc = ok(1 == 2, '1 == 2');	# Test ok1() fails when it should
diag("Returned: $rc");