Have each test print out its description.
authorJames E Keenan <jkeenan@cpan.org>
Sun, 2 Dec 2012 14:07:40 +0000 (09:07 -0500)
committerJames E Keenan <jkeenan@cpan.org>
Sat, 8 Dec 2012 01:05:03 +0000 (20:05 -0500)
Accomplished by modifying the hard-coded 'print ok'-type statements.  (These
tests were written in too idiosyncratic a manner to make conversion to
t/test.pl simple.

Correct order of files in MANIFEST.

See: RT #115838

MANIFEST
t/op/sprintf.t

index 8060e36..032b1b6 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -5247,7 +5247,6 @@ t/opbasic/cmp.t                   See if the various string and numeric compare work
 t/opbasic/concat.t                     See if string concatenation works
 t/opbasic/magic_phase.t                See if ${^GLOBAL_PHASE} works
 t/opbasic/qq.t                 See if qq works
-t/opbasic/sprintf.t                    See if sprintf works
 t/op/bless.t                   See if bless works
 t/op/blocks.t                  See if BEGIN and friends work
 t/op/bop.t                     See if bitops work
@@ -5379,6 +5378,7 @@ t/op/splice.t                     See if splice works
 t/op/split.t                   See if split works
 t/op/split_unicode.t           Test split /\s/ and Unicode
 t/op/sprintf2.t                        See if sprintf works
+t/op/sprintf.t                 See if sprintf works
 t/op/srand.t                   See if srand works
 t/op/sselect.t                 See if 4 argument select works
 t/op/stash.t                   See if %:: stashes work
index 767e5cb..ca07032 100644 (file)
@@ -43,7 +43,7 @@ while (<DATA>) {
     if ($Is_VMS_VAX || $Is_Ultrix_VAX) {
        # VAX DEC C 5.3 at least since there is no
        # ccflags =~ /float=ieee/ on VAX.
-       # AXP is unaffected whether or not it's using ieee.
+       # AXP is unaffected whether or not it is using ieee.
         $data   =~ s/([eE])96$/${1}26/;      # smaller exponents
         $result =~ s/([eE]\+)102$/${1}32/;   #  "       "
         $data   =~ s/([eE])\-101$/${1}-24/;  # larger exponents
@@ -105,7 +105,7 @@ for ($i = 1; @tests; $i++) {
        } elsif ($os =~ /\b$^O(?::(\S+))?\b/i) {
            my $vsn = defined $1 ? $1 : "0";
            # Only compare on the the first pair of digits, as numeric
-           # compares don't like 2.6.10-3mdksmp or 2.6.8-24.10-default
+           # compares do not like 2.6.10-3mdksmp or 2.6.8-24.10-default
            s/^(\d+(\.\d+)?).*/$1/ for $osv, $vsn;
            $skip = $vsn ? ($osv <= $vsn ? 1 : 0) : 1;
        }
@@ -113,27 +113,27 @@ for ($i = 1; @tests; $i++) {
     }
 
     if ($x eq ">$result<") {
-        print "ok $i\n";
+        print "ok $i - >$result<\n";
     }
     elsif ($skip) {
-       print "ok $i # skip $comment\n";
+       print "ok $i # skip $comment\n";
     }
     elsif ($y eq ">$result<")  # Some C libraries always give
     {                          # three-digit exponent
-               print("ok $i # >$result< $x three-digit exponent accepted\n");
+               print("ok $i # >$result< $x three-digit exponent accepted\n");
     }
        elsif ($result =~ /[-+]\d{3}$/ &&
                   # Suppress tests with modulo of exponent >= 100 on platforms
-                  # which can't handle such magnitudes (or where we can't tell).
+                  # which cannot handle such magnitudes (or where we cannot tell).
                   ((!eval {require POSIX}) || # Costly: only do this if we must!
                        (length(&POSIX::DBL_MAX) - rindex(&POSIX::DBL_MAX, '+')) == 3))
        {
-               print("ok $i # >$template< >$data< >$result<",
+               print("ok $i # >$template< >$data< >$result<",
                          " Suppressed: exponent out of range?\n");
        }
     else {
        $y = ($x eq $y ? "" : " => $y");
-       print("not ok $i >$template< >$data< >$result< $x$y",
+       print("not ok $i >$template< >$data< >$result< $x$y",
            $comment ? " # $comment\n" : "\n");
     }
 }