X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan_tools%2Flibtap%2Ftests%2Fok%2Fok%2Ftest.pl;fp=ccan_tools%2Flibtap%2Ftests%2Fok%2Fok%2Ftest.pl;h=5ea966ef20af60f5064e3128d70659a57f7eea73;hp=0000000000000000000000000000000000000000;hb=7bbd49fdb03503688dd34ab860e0e02e852ed267;hpb=fdfcdafbfa7957b6ca393bb4000fbaad3813a61a diff --git a/ccan_tools/libtap/tests/ok/ok/test.pl b/ccan_tools/libtap/tests/ok/ok/test.pl new file mode 100644 index 00000000..5ea966ef --- /dev/null +++ b/ccan_tools/libtap/tests/ok/ok/test.pl @@ -0,0 +1,25 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +use Test::More; + +my $rc = 0; + +plan tests => 5; + +$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");