Module: tools Branch: master Commit: e377b8d508144f057a2e6111fc85e125c564948c URL: https://source.winehq.org/git/tools.git/?a=commit;h=e377b8d508144f057a2e6111...
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Mar 23 01:19:15 2018 +0100
testbot: Standardize on push to append to an array.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/Engine.pl | 6 +++--- testbot/bin/WineSendLog.pl | 4 ++-- testbot/lib/ObjectModel/CGI/CollectionBlock.pm | 2 +- testbot/lib/ObjectModel/CGI/ItemPage.pm | 3 +-- testbot/lib/ObjectModel/DBIBackEnd.pm | 10 +++++----- testbot/lib/ObjectModel/Item.pm | 2 +- 6 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl index a03fa06..f39ec5f 100755 --- a/testbot/bin/Engine.pl +++ b/testbot/bin/Engine.pl @@ -813,9 +813,9 @@ sub main() { if (PrepareSocket($NewClientSocket)) { - $Clients[@Clients] = {Socket => $NewClientSocket, - InBuf => "", - OutBuf => ""}; + push @Clients, {Socket => $NewClientSocket, + InBuf => "", + OutBuf => ""}; } else { diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl index ec9a587..2a89427 100755 --- a/testbot/bin/WineSendLog.pl +++ b/testbot/bin/WineSendLog.pl @@ -106,13 +106,13 @@ sub ReadLog($$$) { if ($Line =~ m/${BaseName}:${TestSet} done (258)/) { - $Messages[@Messages] = "The test timed out"; + push @Messages, "The test timed out"; } $Found = 1; } else { - $Messages[@Messages] = $Line; + push @Messages, $Line; } } } diff --git a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm index 5723554..ca2c6d3 100644 --- a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm +++ b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm @@ -373,7 +373,7 @@ sub GetActions($) my ($MasterColNames, $MasterColValues) = $self->{Collection}->GetMasterCols(); if (defined($MasterColNames)) { - $Actions[@Actions] = 'Cancel'; + push @Actions, "Cancel"; }
return @Actions; diff --git a/testbot/lib/ObjectModel/CGI/ItemPage.pm b/testbot/lib/ObjectModel/CGI/ItemPage.pm index 74ce14e..4086a93 100644 --- a/testbot/lib/ObjectModel/CGI/ItemPage.pm +++ b/testbot/lib/ObjectModel/CGI/ItemPage.pm @@ -116,8 +116,7 @@ sub GetActions($) my ($self) = @_;
my @Actions = @{$self->SUPER::GetActions()}; - $Actions[@Actions] = "OK"; - $Actions[@Actions] = "Cancel"; + push @Actions, "OK", "Cancel";
return @Actions; } diff --git a/testbot/lib/ObjectModel/DBIBackEnd.pm b/testbot/lib/ObjectModel/DBIBackEnd.pm index 60e68d8..a508f66 100644 --- a/testbot/lib/ObjectModel/DBIBackEnd.pm +++ b/testbot/lib/ObjectModel/DBIBackEnd.pm @@ -385,8 +385,8 @@ sub GetInsertData($$$) { foreach my $ColName (@{$PropertyDescriptor->GetColNames()}) { - $Data[@Data] = $self->ToDb($Item->GetColValue($ColName), - $PropertyDescriptor); + push @Data, $self->ToDb($Item->GetColValue($ColName), + $PropertyDescriptor); } }
@@ -434,8 +434,8 @@ sub GetUpdateData($$$) { foreach my $ColName (@{$PropertyDescriptor->GetColNames()}) { - $Data[@Data] = $self->ToDb($Item->GetColValue($ColName), - $PropertyDescriptor); + push @Data, $self->ToDb($Item->GetColValue($ColName), + $PropertyDescriptor); } } } @@ -451,7 +451,7 @@ sub GetUpdateData($$$) { foreach my $ColName (@{$PropertyDescriptor->GetColNames()}) { - $Data[@Data] = $Item->GetColValue($ColName); + push @Data, $Item->GetColValue($ColName); } } } diff --git a/testbot/lib/ObjectModel/Item.pm b/testbot/lib/ObjectModel/Item.pm index e90ebbe..424826f 100644 --- a/testbot/lib/ObjectModel/Item.pm +++ b/testbot/lib/ObjectModel/Item.pm @@ -386,7 +386,7 @@ sub GetKeyComponents($) { foreach my $ColName (@{$PropertyDescriptor->GetColNames()}) { - $KeyComponents[@KeyComponents] = $self->{ColValues}{$ColName}; + push @KeyComponents, $self->{ColValues}{$ColName}; } } }