Add PRIOR as special and unary op to SQLAHacks::Oracle and use _recurse_where to...
[dbsrgits/DBIx-Class-Historic.git] / t / 54taint.t
CommitLineData
83542a7d 1#!perl -T
2
3# the above line forces Test::Harness into taint-mode
4
5use strict;
6use warnings;
7
91b0ad0b 8use Test::More;
f3405058 9BEGIN { plan tests => 7 }
83542a7d 10
91b0ad0b 11package DBICTest::Taint::Classes;
83542a7d 12
91b0ad0b 13use Test::More;
14use Test::Exception;
83542a7d 15
16use lib qw(t/lib);
91b0ad0b 17use base qw/DBIx::Class::Schema/;
18
19lives_ok (sub {
20 __PACKAGE__->load_classes(qw/Manual/);
21 ok( __PACKAGE__->source('Manual'), 'The Classes::Manual source has been registered' );
22 __PACKAGE__->_unregister_source (qw/Manual/);
23}, 'Loading classes with explicit load_classes worked in taint mode' );
24
25lives_ok (sub {
26 __PACKAGE__->load_classes();
27 ok( __PACKAGE__->source('Auto'), 'The Classes::Auto source has been registered' );
28 ok( __PACKAGE__->source('Auto'), 'The Classes::Manual source has been re-registered' );
29}, 'Loading classes with Module::Find/load_classes worked in taint mode' );
30
83542a7d 31
91b0ad0b 32package DBICTest::Taint::Namespaces;
83542a7d 33
91b0ad0b 34use Test::More;
35use Test::Exception;
36
37use lib qw(t/lib);
83542a7d 38use base qw/DBIx::Class::Schema/;
39
91b0ad0b 40lives_ok (sub {
41 __PACKAGE__->load_namespaces();
42 ok( __PACKAGE__->source('Test'), 'The Namespaces::Test source has been registered' );
43}, 'Loading classes with Module::Find/load_namespaces worked in taint mode' );
44
83542a7d 451;