test.pl 579 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/perl
  2. use warnings;
  3. use strict;
  4. use Test::More;
  5. my $rc = 0;
  6. $rc = plan tests => 5;
  7. diag("Returned: " . sprintf("%d", $rc));
  8. $rc = ok(1 == 1, '1 equals 1'); # Test ok() passes when it should
  9. diag("Returned: $rc");
  10. $rc = ok(1 == 1, '1 equals 1'); # Used for %d testing in test.c
  11. diag("Returned: $rc");
  12. $rc = ok(1 == 1, '1 == 1'); # Test ok1() passes when it should
  13. diag("Returned: $rc");
  14. $rc = ok(1 == 2, '1 equals 2'); # Test ok() fails when it should
  15. diag("Returned: $rc");
  16. $rc = ok(1 == 2, '1 == 2'); # Test ok1() fails when it should
  17. diag("Returned: $rc");