[PATCH] testbot: Standardize on push to append to an array.
Francois Gouget
fgouget at codeweavers.com
Thu Mar 22 19:19:15 CDT 2018
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
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 a03fa06b9..f39ec5fa7 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 ec9a587b5..2a8942701 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 572355432..ca2c6d3e1 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 74ce14e32..4086a9385 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 60e68d8fc..a508f666f 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 e90ebbe74..424826f23 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};
}
}
}
--
2.16.2
More information about the wine-devel
mailing list