Skip to content

Commit 4175112

Browse files
committed
Sanitised layout - now to start hacking
1 parent b643abe commit 4175112

File tree

9 files changed

+39
-64
lines changed

9 files changed

+39
-64
lines changed

pod/Changes.pod renamed to Changes

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
1+
Revision history for SQL::Abstract
12

2-
RCS file: /home/nwiger/perlmod/lib/SQL/RCS/Abstract.pm,v
3-
Working file: /home/nwiger/perlmod/lib/SQL/Abstract.pm
4-
head: 1.20
5-
branch:
6-
locks: strict
7-
access list:
8-
symbolic names:
9-
keyword substitution: kv
10-
total revisions: 20; selected revisions: 20
11-
description:
12-
SQL::Abstract - Generate SQL from Perl data structures
133
----------------------------
144
revision 1.20
155
date: 2005/08/18 18:41:58; author: nwiger; state: Exp; lines: +104 -50
@@ -97,4 +87,3 @@ added scalar ref for SQL verbatim in where, fixed bugs, array ref, docs
9787
revision 1.1
9888
date: 2001/10/24 00:26:43; author: nwiger; state: Exp;
9989
Initial revision
100-
=============================================================================

pod/INSTALL.pod renamed to INSTALL

File renamed without changes.
File renamed without changes.

t/00new.t

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
#!/usr/bin/perl -I. -w
1+
#!/usr/bin/perl
22

33
use strict;
4-
use vars qw($TESTING);
5-
$TESTING = 1;
6-
use Test;
4+
use warnings;
5+
use Test::More;
76

8-
# use a BEGIN block so we print our plan before SQL::Abstract is loaded
9-
BEGIN { plan tests => 14 }
107

11-
use SQL::Abstract;
8+
plan tests => 15;
9+
10+
use_ok('SQL::Abstract');
1211

1312
my @handle_tests = (
1413
#1
@@ -93,11 +92,7 @@ for (@handle_tests) {
9392
my $sql = SQL::Abstract->new($_->{args});
9493
my $bind = $_->{bind} || { a => 4, b => 0};
9594
my($stmt, @bind) = $sql->select('test', '*', $bind);
96-
ok($stmt eq $_->{stmt} && @bind) or
97-
warn "got\n",
98-
"[$stmt], [@bind]\n",
99-
"instead of\n",
100-
"[$_->{stmt}] [4, 0]\n\n";
95+
ok($stmt eq $_->{stmt} && @bind);
10196
}
10297

10398

t/01generate.t

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
#!/usr/bin/perl -I. -w
1+
#!/usr/bin/perl
22

33
use strict;
4-
use vars qw($TESTING);
5-
$TESTING = 1;
6-
use Test;
4+
use warnings;
5+
use Test::More;
76

8-
# use a BEGIN block so we print our plan before SQL::Abstract is loaded
9-
BEGIN { plan tests => 60 }
7+
8+
plan tests => 60;
109

1110
use SQL::Abstract;
1211

t/02where.t

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
#!/usr/bin/perl -I. -w
1+
#!/usr/bin/perl
22

33
use strict;
4-
use vars qw($TESTING);
5-
$TESTING = 1;
6-
use Test;
4+
use warnings;
5+
use Test::More;
76

8-
# use a BEGIN block so we print our plan before SQL::Abstract is loaded
9-
# we run each test TWICE to make sure _anoncopy is working
10-
BEGIN { plan tests => 24 }
7+
plan tests => 24;
118

129
use SQL::Abstract;
1310

t/03values.t

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
#!/usr/bin/perl -I. -w
1+
#!/usr/bin/perl
22

33
use strict;
4-
use vars qw($TESTING);
5-
$TESTING = 1;
6-
use Test;
4+
use warnings;
5+
use Test::More;
76

8-
# use a BEGIN block so we print our plan before SQL::Abstract is loaded
9-
BEGIN { plan tests => 5 }
7+
8+
plan tests => 5;
109

1110
use SQL::Abstract;
1211

t/04from.t

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
#!/usr/bin/perl -I. -w
1+
#!/usr/bin/perl
22

33
use strict;
4-
use vars qw($TESTING);
5-
$TESTING = 1;
6-
use Test;
4+
use warnings;
5+
use Test::More;
76

8-
# use a BEGIN block so we print our plan before SQL::Abstract is loaded
9-
BEGIN { plan tests => 4 }
7+
8+
plan tests => 4;
109

1110
use SQL::Abstract;
1211

t/05quotes.t

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,13 @@ use warnings;
33

44
use vars qw($TESTING);
55
$TESTING = 1;
6-
use Test;
6+
use Test::More;
77

88
# use a BEGIN block so we print our plan before SQL::Abstract is loaded
9-
BEGIN { plan tests => 4 }
9+
BEGIN { plan tests => 7 }
1010

1111
use SQL::Abstract;
1212

13-
sub is {
14-
my ($got, $expect, $msg) = @_;
15-
ok($got eq $expect) or
16-
warn "got [${got}]\ninstead of [${expect}]\nfor test ${msg}\n\n";
17-
}
18-
1913
my $sql_maker = SQL::Abstract->new;
2014

2115
$sql_maker->{quote_char} = '`';
@@ -75,13 +69,16 @@ is($sql,
7569
undef
7670
);
7771

78-
#TODO: {
79-
# local $TODO = "order_by with quoting needs fixing (ash/castaway)";
80-
#
81-
# is($sql,
82-
# q/SELECT `me`.`cdid`, `me`.`artist`, `me`.`title`, `me`.`year` FROM `cd` `me` ORDER BY `year` DESC/,
83-
# 'quoted ORDER BY with DESC okay');
84-
#}
72+
73+
74+
TODO: {
75+
local $TODO = "order_by with quoting needs fixing (ash/castaway)";
76+
77+
is($sql,
78+
q/SELECT `me`.`cdid`, `me`.`artist`, `me`.`title`, `me`.`year` FROM `cd` `me` ORDER BY `year` DESC/,
79+
'quoted ORDER BY with DESC okay');
80+
}
81+
8582

8683
($sql,) = $sql_maker->select(
8784
[

0 commit comments

Comments
 (0)