Bug 70605 - Add split_order_term to test script (for old version)

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1315 6955db30-a419-402b-8a0d-67ecbb4d7f56
master
vfilippov 2011-07-26 10:52:04 +00:00
parent 1db029753b
commit 9d8ea23c90
1 changed files with 11 additions and 0 deletions

View File

@ -239,6 +239,17 @@ sub finish
exit;
}
# Splits out "asc|desc" from a sort order item.
sub split_order_term
{
my $fragment = shift;
my ($col, $dir) = split /\s+/, $fragment, 2;
$col = lc $col;
$dir = uc $dir;
$dir = '' if $dir ne 'DESC' && $dir ne 'ASC';
return wantarray ? ($col, $dir) : $col;
}
sub make_order
{
my ($order) = @_;