Thread: [Module-build-checkins] Module-Build/t basic.t,1.44,1.45 compat.t,1.31,1.32 install.t,1.22,1.23 mani
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <si...@us...> - 2005-10-02 23:06:13
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6578/t Modified Files: basic.t compat.t install.t manifypods.t runthrough.t signature.t xs.t Log Message: Change tests from using "ok ! $@" to "is $@, \' for better diagnostics. Index: signature.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/signature.t,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- signature.t 29 Jun 2005 08:27:06 -0000 1.12 +++ signature.t 2 Oct 2005 05:26:07 -0000 1.13 @@ -52,7 +52,7 @@ { eval {$mb->dispatch('distdir')}; - ok ! $@; + is $@, ''; chdir( $mb->dist_dir ) or die "Can't chdir to '@{[$mb->dist_dir]}': $!"; ok -e 'SIGNATURE'; @@ -71,13 +71,13 @@ local *Module::Build::Base::ACTION_distmeta = sub { push @run_order, 'distmeta' }; eval { $mb->dispatch('distdir') }; } - ok ! $@; + is $@, ''; is $run_order[0], 'distmeta'; is $run_order[1], 'sign'; } eval { $mb->dispatch('realclean') }; -ok ! $@; +is $@, ''; # cleanup Index: compat.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/compat.t,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- compat.t 29 Jun 2005 08:27:06 -0000 1.31 +++ compat.t 2 Oct 2005 05:26:07 -0000 1.32 @@ -85,7 +85,7 @@ my $warning = ''; local $SIG{__WARN__} = sub { $warning = shift; }; my $maketext = eval { Module::Build::Compat->fake_makefile(makefile => 'Makefile') }; - ok ! $@; + is $@, ''; like $maketext, qr/^realclean/m; like $warning, qr/build_class/; } Index: install.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/install.t,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- install.t 29 Jun 2005 08:27:06 -0000 1.22 +++ install.t 2 Oct 2005 05:26:07 -0000 1.23 @@ -53,7 +53,7 @@ { eval {$mb->dispatch('install', destdir => $destdir)}; - ok ! $@; + is $@, ''; my $libdir = strip_volume( $mb->install_destination('lib') ); my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; @@ -62,7 +62,7 @@ local @INC = (@INC, File::Spec->catdir($destdir, $libdir)); eval "require @{[$dist->name]}"; - ok ! $@; + is $@, ''; # Make sure there's a packlist installed my $archdir = $mb->install_destination('arch'); @@ -73,7 +73,7 @@ { eval {$mb->dispatch('install', installdirs => 'core', destdir => $destdir)}; - ok ! $@; + is $@, ''; my $libdir = strip_volume( $Config{installprivlib} ); my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; print "Should have installed module as $install_to\n"; Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- xs.t 23 Sep 2005 02:34:19 -0000 1.27 +++ xs.t 2 Oct 2005 05:26:07 -0000 1.28 @@ -46,10 +46,10 @@ eval {$mb->dispatch('clean')}; -ok ! $@; +is $@, ''; eval {$mb->dispatch('build')}; -ok ! $@; +is $@, ''; { # Make sure it actually works @@ -72,19 +72,19 @@ { # Try again in a subprocess eval {$mb->dispatch('clean')}; - ok ! $@; + is $@, ''; $mb->create_build_script; ok -e 'Build'; eval {$mb->run_perl_script('Build')}; - ok ! $@; + is $@, ''; } # We can't be verbose in the sub-test, because Test::Harness will # think that the output is for the top-level test. eval {$mb->dispatch('test')}; -ok ! $@; +is $@, ''; { $mb->dispatch('ppd', args => {codebase => '/path/to/codebase-xs'}); @@ -118,15 +118,15 @@ unless $mb->os_type eq 'Unix'; eval {$mb->dispatch('clean')}; - ok ! $@; + is $@, ''; local $mb->{config}{ld} = "FOO=BAR $mb->{config}{ld}"; eval {$mb->dispatch('build')}; - ok ! $@; + is $@, ''; } eval {$mb->dispatch('realclean')}; -ok ! $@; +is $@, ''; # Make sure blib/ is gone after 'realclean' ok ! -e 'blib'; Index: manifypods.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/manifypods.t,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- manifypods.t 28 Jul 2005 03:07:01 -0000 1.15 +++ manifypods.t 2 Oct 2005 05:26:07 -0000 1.16 @@ -103,7 +103,7 @@ $mb->dispatch('build'); eval {$mb->dispatch('docs')}; -ok ! $@; +is $@, ''; while (my ($from, $v) = each %distro) { if (!$v) { Index: runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- runthrough.t 29 Jun 2005 08:27:06 -0000 1.57 +++ runthrough.t 2 Oct 2005 05:26:07 -0000 1.58 @@ -80,7 +80,7 @@ $mb->add_to_cleanup('before_script'); eval {$mb->create_build_script}; -ok ! $@; +is $@, ''; ok -e $mb->build_script; is $mb->dist_dir, 'Simple-0.01'; @@ -97,7 +97,7 @@ my $output = eval { stdout_of( sub { $mb->dispatch('test', verbose => 1) } ) }; -ok ! $@; +is $@, ''; like $output, qr/all tests successful/i; # This is the output of lib/Simple/Script.PL @@ -114,13 +114,13 @@ skip( 'YAML_support feature is not enabled', 7 ) unless $have_yaml; eval {$mb->dispatch('disttest')}; - ok ! $@; + is $@, ''; # After a test, the distdir should contain a blib/ directory ok -e File::Spec->catdir('Simple-0.01', 'blib'); eval {$mb->dispatch('distdir')}; - ok ! $@; + is $@, ''; # The 'distdir' should contain a lib/ directory ok -e File::Spec->catdir('Simple-0.01', 'lib'); @@ -142,7 +142,7 @@ $mb->add_to_cleanup($mb->dist_dir . ".tar.gz"); eval {$mb->dispatch('dist')}; - ok ! $@; + is $@, ''; } } @@ -187,7 +187,7 @@ eval {$mb->dispatch('realclean')}; -ok ! $@; +is $@, ''; ok ! -e $mb->build_script; ok ! -e $mb->config_dir; Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- basic.t 29 Jul 2005 03:24:42 -0000 1.44 +++ basic.t 2 Oct 2005 05:26:07 -0000 1.45 @@ -147,7 +147,7 @@ $dist->regen; eval {Module::Build->run_perl_script('Build.PL', [], ['skip_rcfile=1', '--config', "foocakes=barcakes", '--foo', '--bar', '--bar', '-bat=hello', 'gee=whiz', '--any', 'hey', '--destdir', 'yo', '--verbose', '1'])}; - ok ! $@; + is $@, ''; my $mb = Module::Build->resume; is $mb->config->{cc}, $Config{cc}; |