This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add access to Perl_croak() via 'mycroak' in XS::APItest
[perl5.git] / ext / XS / APItest / t / printf.t
index 7cfc3dc..ef2769e 100644 (file)
@@ -1,6 +1,7 @@
 BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
+    push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
     require Config; import Config;
     if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
         print "1..0 # Skip: XS::APItest was not built\n";
@@ -8,7 +9,7 @@ BEGIN {
     }
 }
 
-use Test::More tests => 15;
+use Test::More tests => 11;
 
 BEGIN { use_ok('XS::APItest') };
 
@@ -31,19 +32,17 @@ print_int(3);
 print_long(4);
 print_float(4);
 print_long_double() if $ldok;  # val=7 hardwired
-print_iv(2);
-print_iv(-2);
-print_uv(3);
-print_nv(6);
+
+print_flush();
 
 # Now redirect STDOUT and read from the file
 ok open(STDOUT, ">&", $oldout), "restore STDOUT";
 ok open(my $foo, "<foo.out"), "open foo.out";
-print "# Test output by reading from file\n";
+#print "# Test output by reading from file\n";
 # now test the output
 my @output = map { chomp; $_ } <$foo>;
 close $foo;
-ok @output >= 9, "captured at least nine output lines";
+ok @output >= 4, "captured at least four output lines";
 
 is($output[0], "5.000", "print_double");
 is($output[1], "3", "print_int");
@@ -55,11 +54,3 @@ SKIP: {
    is($output[4], "7.000", "print_long_double");
 }
 
-SKIP: {
-    skip "No perlio", 4 unless $Config{useperlio};
-    is($output[5], "2", "print_nv");
-    is($output[6], "-2", "print_iv positive");
-    is($output[7], "3", "print_iv negative");
-    is($output[8], "6.000", "print_uv");
-}
-