From 821410540bf1d52be8003f56f25bf1560f559ca8 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Fri, 11 Jan 2002 13:57:38 +0000 Subject: [PATCH] patch is silly when creating new files: don't run patch more than once. p4raw-id: //depot/perl@14181 --- lib/Test/Simple/t/buffer.t | 22 ------------------ lib/Test/Simple/t/diag.t | 57 ---------------------------------------------- 2 files changed, 79 deletions(-) diff --git a/lib/Test/Simple/t/buffer.t b/lib/Test/Simple/t/buffer.t index 7cc64d9..6039e4a 100644 --- a/lib/Test/Simple/t/buffer.t +++ b/lib/Test/Simple/t/buffer.t @@ -20,25 +20,3 @@ for my $num (1..10) { $T->current_test($tnum); print "ok $tnum - You're ok\n"; } -#!/usr/bin/perl - -BEGIN { - if( $ENV{PERL_CORE} ) { - chdir 't'; - @INC = '../lib'; - } -} - -# Ensure that intermixed prints to STDOUT and tests come out in the -# right order (ie. no buffering problems). - -use Test::More tests => 20; -my $T = Test::Builder->new; -$T->no_ending(1); - -for my $num (1..10) { - $tnum = $num * 2; - pass("I'm ok"); - $T->current_test($tnum); - print "ok $tnum - You're ok\n"; -} diff --git a/lib/Test/Simple/t/diag.t b/lib/Test/Simple/t/diag.t index 7954ed0..0d6769b 100644 --- a/lib/Test/Simple/t/diag.t +++ b/lib/Test/Simple/t/diag.t @@ -55,60 +55,3 @@ sub PRINT { my $self = shift; $$self .= join('', @_); } -#!perl -w - -BEGIN { - if( $ENV{PERL_CORE} ) { - chdir 't'; - @INC = '../lib'; - } -} - -use strict; - -use Test::More tests => 5; - -my $Test = Test::More->builder; - -# now make a filehandle where we can send data -my $output; -tie *FAKEOUT, 'FakeOut', \$output; - -# force diagnostic output to a filehandle, glad I added this to Test::Builder :) -my @lines; -{ - local $TODO = 1; - $Test->todo_output(\*FAKEOUT); - - diag("a single line"); - - push @lines, $output; - $output = ''; - - diag("multiple\n", "lines"); - push @lines, split(/\n/, $output); -} - -is( @lines, 3, 'diag() should send messages to its filehandle' ); -like( $lines[0], '/^#\s+/', ' should add comment mark to all lines' ); -is( $lines[0], "# a single line\n", ' should send exact message' ); -is( $output, "# multiple\n# lines\n", ' should append multi messages'); - -{ - local $TODO = 1; - $output = ''; - diag("# foo"); -} -is( $output, "# # foo\n", "diag() adds a # even if there's one already" ); - - -package FakeOut; - -sub TIEHANDLE { - bless( $_[1], $_[0] ); -} - -sub PRINT { - my $self = shift; - $$self .= join('', @_); -} -- 2.7.4