From: Matt S Trout Date: Mon, 26 Jun 2006 03:03:38 +0000 (+0000) Subject: quoting fixups (hate windows shell. hate) X-Git-Tag: v0.07002~75^2~78 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0ffbc9ec4cc37ae5fd868d32b545ed2e853f19da;p=dbsrgits%2FDBIx-Class.git quoting fixups (hate windows shell. hate) --- diff --git a/t/89dbicadmin.t b/t/89dbicadmin.t index 7c7a89c..7307c6f 100644 --- a/t/89dbicadmin.t +++ b/t/89dbicadmin.t @@ -19,23 +19,26 @@ if ($@) { plan tests => 5; +# double quotes round the arguments and single-quote within to make sure the +# tests run on windows as well + my $employees = $schema->resultset('Employee'); -my $cmd = qq|perl script/dbicadmin --schema=DBICTest::Schema --class=Employee --tlibs --connect='["dbi:SQLite:dbname=t/var/DBIxClass.db","",""]' --force --tlibs|; +my $cmd = qq|perl script/dbicadmin --schema=DBICTest::Schema --class=Employee --tlibs --connect="['dbi:SQLite:dbname=t/var/DBIxClass.db','','']" --force --tlibs|; -`$cmd --op=insert --set='{name:"Matt"}'`; +`$cmd --op=insert --set="{name:'Matt'}"`; ok( ($employees->count()==1), 'insert count' ); my $employee = $employees->find(1); ok( ($employee->name() eq 'Matt'), 'insert valid' ); -`$cmd --op=update --set='{name:"Trout"}'`; +`$cmd --op=update --set="{name:'Trout'}"`; $employee = $employees->find(1); ok( ($employee->name() eq 'Trout'), 'update' ); -`$cmd --op=insert --set='{name:"Aran"}'`; -my $data = `$cmd --op=select --attrs='{order_by:"name"}'`; +`$cmd --op=insert --set="{name:'Aran'}"`; +my $data = `$cmd --op=select --attrs="{order_by:'name'}"`; ok( ($data=~/Aran.*Trout/s), 'select with attrs' ); -`$cmd --op=delete --where='{name:"Trout"}'`; +`$cmd --op=delete --where="{name:'Trout'}"`; ok( ($employees->count()==1), 'delete' );