From eed1016d134ad7f8812f1dc8946c45b365da5732 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sat, 16 Jun 2007 18:27:53 +0100 Subject: [PATCH] * remove debugging code in pkgreport.cgi that snuck in * Fix ordering in vercmp for reopen * Test that reopen actually works --- cgi/pkgreport.cgi | 1 - scripts/service.in | 2 +- t/06_mail_handling.t | 22 +++++++++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index 8b9af3a..8a3f300 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -734,7 +734,6 @@ sub pkg_htmlizebugs { $html .= pkg_htmlindexentrystatus(\%status) . "\n"; push @status, [ $bug, \%status, $html ]; } - print STDERR "nbnug_order: $bug_order\n"; if ($bug_order eq 'age') { # MWHAHAHAHA @status = sort {$a->[1]{log_modified} <=> $b->[1]{log_modified}} @status; diff --git a/scripts/service.in b/scripts/service.in index a161f89..74768f3 100755 --- a/scripts/service.in +++ b/scripts/service.in @@ -562,7 +562,7 @@ END addfoundversions($data, $data->{package}, $version, 'binary'); my @fixed_order = sort {Debbugs::Versions::Dpkg::vercmp($a,$b);} @{$data->{fixed_versions}}; - if (not @fixed_order or (vercmp($fixed_order[-1],$version) >= 0)) { + if (not @fixed_order or (Debbugs::Versions::Dpkg::vercmp($version,$fixed_order[-1]) >= 0)) { $data->{done} = ''; } } else { diff --git a/t/06_mail_handling.t b/t/06_mail_handling.t index 4f8e89d..959b802 100644 --- a/t/06_mail_handling.t +++ b/t/06_mail_handling.t @@ -1,7 +1,7 @@ # -*- mode: cperl;-*- # $Id: 05_mail.t,v 1.1 2005/08/17 21:46:17 don Exp $ -use Test::More tests => 52; +use Test::More tests => 64; use warnings; use strict; @@ -155,6 +155,26 @@ my @control_commands = status_key => 'fixed_versions', status_value => [], }, + 'found_1.0~5+1b2' => {command => 'found', + value => '1.0~5+1b2', + status_key => 'found_versions', + status_value => ['1.0~5+1b2'], + }, + 'fixed_1.2' => {command => 'fixed', + value => '1.2', + status_key => 'fixed_versions', + status_value => ['1.2'], + }, + close => {command => 'close', + value => '', + status_key => 'done', + status_value => 'foo@bugs.something', + }, + 'found_1.3' => {command => 'found', + value => '1.3', + status_key => 'done', + status_value => '', + }, submitter_foo => {command => 'submitter', value => 'foo@bar.com', status_key => 'originator', -- 2.39.2