perl.cvs.parrot
[Top] [All Lists]

[svn:parrot] r21807 - in branches/reconfigure: . t/configure

Subject: [svn:parrot] r21807 - in branches/reconfigure: . t/configure
From:
Date: Wed, 3 Oct 2007 20:06:01 -0700 PDT
Newsgroups: perl.cvs.parrot

Author: jkeenan
Date: Wed Oct  3 20:06:00 2007
New Revision: 21807

Added:
   branches/reconfigure/t/configure/049-run_single_step.t   (contents, props 
changed)
Modified:
   branches/reconfigure/MANIFEST

Log:
Add another test file to cover all conditions in 
Parrot::Configure::run_single_step().

Modified: branches/reconfigure/MANIFEST
==============================================================================
--- branches/reconfigure/MANIFEST       (original)
+++ branches/reconfigure/MANIFEST       Wed Oct  3 20:06:00 2007
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Thu Oct  4 01:12:46 2007 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu Oct  4 03:03:47 2007 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -2960,6 +2960,7 @@
 t/configure/046-inter.t                                     []
 t/configure/047-inter.t                                     []
 t/configure/048-return_undef.t                              []
+t/configure/049-run_single_step.t                           []
 t/configure/101-init_manifest.01.t                          []
 t/configure/101-init_manifest.02.t                          []
 t/configure/102-init_defaults.01.t                          []

Added: branches/reconfigure/t/configure/049-run_single_step.t
==============================================================================
--- (empty file)
+++ branches/reconfigure/t/configure/049-run_single_step.t      Wed Oct  3 
20:06:00 2007
@@ -0,0 +1,78 @@
+#! perl
+# Copyright (C) 2007, The Perl Foundation.
+# $Id$
+# 037-run_single_step.t
+
+use strict;
+use warnings;
+
+use Test::More tests =>  5;
+use Carp;
+use lib qw( lib t/configure/testlib );
+use Parrot::Configure;
+use Parrot::Configure::Options qw( process_options );
+
+$| = 1;
+is($|, 1, "output autoflush is set");
+
+my $args = process_options(
+    {
+        argv => [],
+        mode => q{configure},
+    }
+);
+ok( defined $args, "process_options returned successfully" );
+my %args = %$args;
+
+my $conf = Parrot::Configure->new;
+ok( defined $conf, "Parrot::Configure->new() returned okay" );
+
+my $step = q{init::zeta};
+$conf->add_step($step);
+$conf->options->set( %{$args} );
+
+eval {
+    $conf->run_single_step('init::omega');
+};
+like( $@,
+    qr/Mangled task in run_single_step/,
+    "Got expected error message"
+);
+
+pass("Completed all tests in $0");
+
+################### DOCUMENTATION ###################
+
+=head1 NAME
+
+037-run_single_step.t - test C<run_single_step()> during configuration
+
+=head1 SYNOPSIS
+
+    % prove t/configure/037-run_single_step.t
+
+=head1 DESCRIPTION
+
+The files in this directory test functionality used by F<Configure.pl>.
+
+The tests in this file examine what would happen if
+C<Parrot::Configure::run_single_step()> were run during configuration.
+This is not its typical or recommended use.  It is more typically called
+post-configuration by F<tools/dev/reconfigure.pl>.
+
+=head1 AUTHOR
+
+James E Keenan
+
+=head1 SEE ALSO
+
+Parrot::Configure, F<Configure.pl>.
+
+=cut
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:parrot] r21807 - in branches/reconfigure: . t/configure, jkeenan <=