Bugzilla – Attachment 38995 Details for
Bug 13673
Remove warnings from t/db_dependent/Barcodes.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13673: Fix whitespace issues
Bug-13673-Fix-whitespace-issues.patch (text/plain), 6.39 KB, created by
Mark Tompsett
on 2015-05-08 20:28:33 UTC
(
hide
)
Description:
Bug 13673: Fix whitespace issues
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-05-08 20:28:33 UTC
Size:
6.39 KB
patch
obsolete
>From 451317374f46a3e669e2465f6aad791f3e3e6fb6 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 8 May 2015 16:25:32 -0400 >Subject: [PATCH] Bug 13673: Fix whitespace issues > >Indentation was horrible. Fixed to meet 4 space standard. > >TEST PLAN >--------- >1) Notice tabs in t/db_dependent/Barcodes.t >2) prove t/db_dependent/Barcodes.t >3) apply patch >4) prove t/db_dependent/Barcodes.t > -- same output as before. > -- code is identical except for indentations. >5) koha qa test tools >--- > t/db_dependent/Barcodes.t | 84 +++++++++++++++++++++++------------------------ > 1 file changed, 42 insertions(+), 42 deletions(-) > >diff --git a/t/db_dependent/Barcodes.t b/t/db_dependent/Barcodes.t >index 3fb9ce8..c68371f 100755 >--- a/t/db_dependent/Barcodes.t >+++ b/t/db_dependent/Barcodes.t >@@ -5,15 +5,15 @@ use warnings; > > use Test::More tests => 66; > BEGIN { >- use FindBin; >- use lib $FindBin::Bin; >- use_ok('C4::Barcodes'); >+ use FindBin; >+ use lib $FindBin::Bin; >+ use_ok('C4::Barcodes'); > } > > my %thash = ( >- incremental => [], >- annual => [], >- hbyymmincr => ['MAIN'], >+ incremental => [], >+ annual => [], >+ hbyymmincr => ['MAIN'], > EAN13 => ['0000000695152','892685001928'], > ); > >@@ -21,46 +21,46 @@ print "\n"; > my ($obj1,$obj2,$format,$value,$initial,$serial,$re,$next,$previous,$temp); > my @formats = sort keys %thash; > foreach (@formats) { >- my $pre = sprintf '(%-12s)', $_; >- ok($obj1 = C4::Barcodes->new($_), "$pre Barcode Creation : new($_)"); >- SKIP: { >- skip "No Object Returned by new($_)", 17 unless $obj1; >- ok($_ eq ($format = $obj1->autoBarcode()), "$pre autoBarcode() : " . ($format || 'FAILED') ); >- ok($initial= $obj1->initial(), "$pre initial() : " . ($initial|| 'FAILED') ); >- $temp = $obj1->db_max(); >- diag ". $pre db_max() : " . ($temp || 'Database Empty or No Matches') ; >- ok($temp = $obj1->max(), "$pre max() : " . ($temp || 'FAILED') ); >- ok($value = $obj1->value(), "$pre value() : " . ($value || 'FAILED') ); >- ok($serial = $obj1->serial(), "$pre serial() : " . ($serial || 'FAILED') ); >- ok($temp = $obj1->is_max(), "$pre obj1->is_max() [obj1 should currently be max]"); >- diag "Creating new Barcodes object (obj2) based on the old one (obj1)\n"; >- ok($obj2 = $obj1->new(), "$pre Barcode Creation : obj2 = obj1->new()"); >- diag ". $pre obj2->value: " . $obj2->value . "\n"; >- ok(not($obj1->is_max()), "$pre obj1->is_max() [obj1 should no longer be max]"); >- ok( $obj2->is_max(), "$pre obj2->is_max() [obj2 should currently be max]"); >- ok($obj2->serial == $obj1->serial + 1, "$pre obj2->serial() : " . ($obj2->serial || 'FAILED')); >- ok($previous = $obj2->previous(), "$pre obj2->previous() : " . ($previous || 'FAILED')); >- ok($next = $obj1->next(), "$pre obj1->next() : " . ($next || 'FAILED')); >- ok($next->previous()->value() eq $obj1->value(), "$pre Roundtrip, value : " . ($obj1->value || 'FAILED')); >- ok($previous->next()->value() eq $obj2->value(), "$pre Roundtrip, value : " . ($obj2->value || 'FAILED')); >- } >- print "\n"; >+ my $pre = sprintf '(%-12s)', $_; >+ ok($obj1 = C4::Barcodes->new($_), "$pre Barcode Creation : new($_)"); >+ SKIP: { >+ skip "No Object Returned by new($_)", 17 unless $obj1; >+ ok($_ eq ($format = $obj1->autoBarcode()), "$pre autoBarcode() : " . ($format || 'FAILED') ); >+ ok($initial= $obj1->initial(), "$pre initial() : " . ($initial|| 'FAILED') ); >+ $temp = $obj1->db_max(); >+ diag ". $pre db_max() : " . ($temp || 'Database Empty or No Matches') ; >+ ok($temp = $obj1->max(), "$pre max() : " . ($temp || 'FAILED') ); >+ ok($value = $obj1->value(), "$pre value() : " . ($value || 'FAILED') ); >+ ok($serial = $obj1->serial(), "$pre serial() : " . ($serial || 'FAILED') ); >+ ok($temp = $obj1->is_max(), "$pre obj1->is_max() [obj1 should currently be max]"); >+ diag "Creating new Barcodes object (obj2) based on the old one (obj1)\n"; >+ ok($obj2 = $obj1->new(), "$pre Barcode Creation : obj2 = obj1->new()"); >+ diag ". $pre obj2->value: " . $obj2->value . "\n"; >+ ok(not($obj1->is_max()), "$pre obj1->is_max() [obj1 should no longer be max]"); >+ ok( $obj2->is_max(), "$pre obj2->is_max() [obj2 should currently be max]"); >+ ok($obj2->serial == $obj1->serial + 1, "$pre obj2->serial() : " . ($obj2->serial || 'FAILED')); >+ ok($previous = $obj2->previous(), "$pre obj2->previous() : " . ($previous || 'FAILED')); >+ ok($next = $obj1->next(), "$pre obj1->next() : " . ($next || 'FAILED')); >+ ok($next->previous()->value() eq $obj1->value(), "$pre Roundtrip, value : " . ($obj1->value || 'FAILED')); >+ ok($previous->next()->value() eq $obj2->value(), "$pre Roundtrip, value : " . ($obj2->value || 'FAILED')); >+ } >+ print "\n"; > } > > diag "\nTesting with valid inputs:\n"; > foreach $format (@formats) { >- my $pre = sprintf '(%-12s)', $format; >- foreach my $testval (@{$thash{ $format }}) { >- ok($obj1 = C4::Barcodes->new($format,$testval), "$pre Barcode Creation : new('$format','$testval')"); >- if ($format eq 'hbyymmincr') { >- diag "\nExtra tests for hbyymmincr\n"; >- $obj2 = $obj1->new(); >- my $branch; >- ok($branch = $obj1->branch(), "$pre branch() : " . ($branch || 'FAILED') ); >- ok($branch eq $obj2->branch(), "$pre branch extended to derived object : " . ($obj2->branch || 'FAILED')); >- } >- print "\n"; >- } >+ my $pre = sprintf '(%-12s)', $format; >+ foreach my $testval (@{$thash{ $format }}) { >+ ok($obj1 = C4::Barcodes->new($format,$testval), "$pre Barcode Creation : new('$format','$testval')"); >+ if ($format eq 'hbyymmincr') { >+ diag "\nExtra tests for hbyymmincr\n"; >+ $obj2 = $obj1->new(); >+ my $branch; >+ ok($branch = $obj1->branch(), "$pre branch() : " . ($branch || 'FAILED') ); >+ ok($branch eq $obj2->branch(), "$pre branch extended to derived object : " . ($obj2->branch || 'FAILED')); >+ } >+ print "\n"; >+ } > } > > diag "done.\n"; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13673
:
38995
|
38996
|
38997
|
38998
|
39000
|
39001
|
39002
|
39003
|
39004
|
39005
|
39006
|
39010
|
39011
|
39012
|
39013
|
39220
|
39221
|
39222
|
39223