Permalink
Browse files

Cleaned up t/language tests

  • Loading branch information...
1 parent ddbe378 commit 2c7d4e486e7e8e383a952561ea35950671d29a2f @abw committed Feb 9, 2012
View
@@ -5,22 +5,24 @@
# Testing the passing of positional and named arguments to sub-routines
# and object methods.
#
+# Run with -h option for help.
+#
# Written by Andy Wardley <abw@wardley.org>
#
-# Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
#========================================================================
-use strict;
-use warnings;
-use lib qw( ./lib ../lib ../../lib );
+use Badger
+ lib => '../../lib ../../blib/arch';
+
use Template::TT2::Test
- tests => 7,
- debug => 'Template::TT2::Parser',
- args => \@ARGV;
+ tests => 7,
+ debug => 'Template::TT2::Parser',
+ args => \@ARGV;
use Template::TT2::Constants ':status';
View
@@ -5,22 +5,24 @@
# Template script testing the conditional binary operators: and/&&, or/||,
# not/!, <, >, <=, >= , == and !=.
#
+# Run with -h option for help.
+#
# Written by Andy Wardley <abw@wardley.org>
#
-# Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
#========================================================================
-use strict;
-use warnings;
-use lib qw( ./lib ../lib ../../lib );
+use Badger
+ lib => '../../lib ../../blib/arch';
+
use Template::TT2::Test
- tests => 25,
- debug => 'Template::TT2::Parser',
- args => \@ARGV;
+ tests => 25,
+ debug => 'Template::TT2::Parser',
+ args => \@ARGV;
my $counter = 0;
View
@@ -5,22 +5,24 @@
# Test that the output from a directive block can be assigned to a
# variable.
#
+# Run with -h option for help.
+#
# Written by Andy Wardley <abw@wardley.org>
#
-# Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
#========================================================================
-use strict;
-use warnings;
-use lib qw( ./lib ../lib ../../lib );
+use Badger
+ lib => '../../lib ../../blib/arch';
+
use Template::TT2::Test
- tests => 5,
- debug => 'Template::TT2::Parser',
- args => \@ARGV;
+ tests => 5,
+ debug => 'Template::TT2::Parser',
+ args => \@ARGV;
my $config = {
POST_CHOMP => 1,
View
@@ -4,28 +4,30 @@
#
# Test basic directive layout and processing options.
#
+# Run with -h option for help.
+#
# Written by Andy Wardley <abw@wardley.org>
#
-# Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
#========================================================================
-use strict;
-use warnings;
-use lib qw( ./lib ../lib ../../lib );
-use Template::TT2::Test
- tests => 35,
- debug => 'Template::TT2::Parser',
- args => \@ARGV;
+use Badger
+ lib => '../../lib ../../blib/arch',
+ Filesystem => 'Bin';
-use Badger::Filesystem '$Bin Dir';
-use constant ENGINE => 'Template::TT2';
+use Template::TT2::Test
+ tests => 35,
+ debug => 'Template::TT2::Parser',
+ args => \@ARGV;
-my $tdir = Dir($Bin, 'templates')->must_exist;
+use constant
+ ENGINE => 'Template::TT2';
+my $tdir = Bin->dir('templates')->must_exist;
my $engines = {
tt => ENGINE->new(),
pre => ENGINE->new( PRE_CHOMP => 1 ),
View
@@ -4,25 +4,27 @@
#
# Test EXPOSE_BLOCKS option
#
+# Run with -h option for help.
+#
# Written by Andy Wardley <abw@wardley.org>
#
-# Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
#========================================================================
-use strict;
-use warnings;
-use lib qw( ./lib ../lib ../../lib );
+use Badger
+ lib => '../../lib ../../blib/arch',
+ Filesystem => 'Bin';
+
use Template::TT2::Test
tests => 5,
debug => 'Template::TT2',
args => \@ARGV;
-use Badger::Filesystem '$Bin Dir';
-my $tlib = Dir($Bin, 'templates');
+my $tlib = Bin->dir('templates');
my $tt_shielded = Template::TT2->new(
INCLUDE_PATH => $tlib,
View
@@ -5,22 +5,24 @@
# Tests list references as variables, including virtual-methods such
# as first(), last(), etc.
#
+# Run with -h option for help.
+#
# Written by Andy Wardley <abw@wardley.org>
#
-# Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
#========================================================================
-use strict;
-use warnings;
-use lib qw( ./lib ../lib ../../lib );
+use Badger
+ lib => '../../lib ../../blib/arch';
+
use Template::TT2::Test
- tests => 19,
- debug => 'Template::TT2::Stash',
- args => \@ARGV;
+ tests => 19,
+ debug => 'Template::TT2::Stash',
+ args => \@ARGV;
use Template::TT2::Constants ':status';
View
@@ -4,18 +4,20 @@
#
# Template script testing code bindings to objects.
#
+# Run with -h option for help.
+#
# Written by Andy Wardley <abw@wardley.org>
#
-# Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
#========================================================================
-use strict;
-use warnings;
-use lib qw( ./lib ../lib ../../lib );
+use Badger
+ lib => '../../lib ../../blib/arch';
+
use Template::TT2::Test
tests => 23,
debug => 'Template::TT2::Stash',
View
@@ -5,26 +5,28 @@
# Test ability to specify INCLUDE/PROCESS/WRAPPER files in the
# form "foo+bar+baz".
#
+# Run with -h option for help.
+#
# Written by Andy Wardley <abw@wardley.org>
#
-# Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
#========================================================================
-use strict;
-use warnings;
-use lib qw( ./lib ../lib ../../lib );
+use Badger
+ lib => '../../lib ../../blib/arch',
+ Filesystem => 'Bin';
+
use Template::TT2::Test
tests => 6,
debug => 'Template::TT2::Templates',
args => \@ARGV;
use Template::TT2 'TT2_MODULES';
-use Badger::Filesystem '$Bin Dir';
-my $tdir = Dir($Bin, 'templates', 'plusfile')->must_exist;
+my $tdir = Bin->dir('templates', 'plusfile')->must_exist;
test_expect( config => { INCLUDE_PATH => $tdir });
View
@@ -4,22 +4,19 @@
#
# Template script testing variable references.
#
+# Run with -h option for help.
+#
# Written by Andy Wardley <abw@wardley.org>
#
-# Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
#========================================================================
use Badger
- lib => [
- '../lib',
- '../../lib',
- '../../blib',
- '../../blib/arch',
- ];
+ lib => '../../lib ../../blib/arch';
use Template::TT2::Test
tests => 6,
View
@@ -4,25 +4,29 @@
#
# Test general text blocks, ensuring all characters can be used.
#
+# Run with -h option for help.
+#
# Written by Andy Wardley <abw@wardley.org>
#
-# Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
#
#========================================================================
-use strict;
-use warnings;
-use lib qw( ./lib ../lib ../../lib );
+
+use Badger
+ lib => '../../lib ../../blib/arch';
+
use Template::TT2::Test
tests => 14,
debug => 'Template::TT2::Parser',
args => \@ARGV;
-use constant ENGINE => 'Template::TT2';
+use constant
+ ENGINE => 'Template::TT2';
#------------------------------------------------------------------------
package Stringy;
View
@@ -6,30 +6,29 @@
#
# Written by Andy Wardley <abw@wardley.org>
#
-# Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
+# Run with -h option for help.
+#
+# Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
#========================================================================
use Badger
- lib => [
- '../lib',
- '../../lib',
- '../../blib',
- '../../blib/arch',
- ];
+ lib => '../../lib ../../blib/arch',
+ Filesystem => 'Bin';
use Template::TT2::Test
- debug => 'Template::TT2::Parser',
- args => \@ARGV;
+ debug => 'Template::TT2::Parser',
+ args => \@ARGV;
+
+use constant
+ ENGINE => 'Template::TT2';
use Template::TT2::Stash;
use Template::TT2::Stash::Perl;
-use Badger::Filesystem '$Bin Dir';
-use constant ENGINE => 'Template::TT2';
-my $dir = Dir($Bin, 'templates')->must_exist;
+my $dir = Bin->dir('templates')->must_exist;
my $xs = Template::TT2::Stash->xs_backend;
# 2 runs if we don't have XS stash, 3 if we do
Oops, something went wrong.

0 comments on commit 2c7d4e4

Please sign in to comment.