]> git.ozlabs.org Git - ccan/blobdiff - ccan_tools/libtap/tests/ok/ok/test.pl
Include all the tools under ccan_tools dir, hacked to work for me.
[ccan] / ccan_tools / libtap / tests / ok / ok / test.pl
diff --git a/ccan_tools/libtap/tests/ok/ok/test.pl b/ccan_tools/libtap/tests/ok/ok/test.pl
new file mode 100644 (file)
index 0000000..5ea966e
--- /dev/null
@@ -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");