[Bps-public-commit] r12590 - in pie/branches/helloworldtest: .
jesse at bestpractical.com
jesse at bestpractical.com
Wed May 21 03:42:23 EDT 2008
Author: jesse
Date: Wed May 21 03:42:22 2008
New Revision: 12590
Modified:
pie/branches/helloworldtest/ (props changed)
pie/branches/helloworldtest/t/hello_world.t
Log:
r31827 at 31b: jesse | 2008-05-21 15:41:36 +0800
* more basic tests for an ordered list of expressions
Modified: pie/branches/helloworldtest/t/hello_world.t
==============================================================================
--- pie/branches/helloworldtest/t/hello_world.t (original)
+++ pie/branches/helloworldtest/t/hello_world.t Wed May 21 03:42:22 2008
@@ -49,6 +49,7 @@
$hello->evaluator->set_named('make-fred', sub { my $name = shift; return 'fred'});
+$hello->evaluator->set_named('make-bob', sub { my $name = shift; return 'bob'});
my $tree = [ 'make-fred'];
my $builder = PIE::Builder->new();
@@ -57,4 +58,19 @@
can_ok($hello->rules->[0], 'evaluate');
is ($hello->run('jesse'),'Hello fred');
+
+
+$hello->rules([ $builder->build_expressions([qw/make-bob make-fred/]) ]);
+can_ok($hello->rules->[0], 'evaluate');
+is ($hello->run('jesse'),'Hello fred');
+
+$hello->rules([ $builder->build_expressions([qw/make-bob/]),
+ $builder->build_expressions([qw/make-bob/]) ]);
+can_ok($hello->rules->[0], 'evaluate');
+can_ok($hello->rules->[1], 'evaluate');
+is ($hello->run('jesse'),'Hello fred');
+
+
+
+
1;
More information about the Bps-public-commit
mailing list