~ubuntu-branches/ubuntu/oneiric/libapreq2/oneiric

« back to all changes in this revision

Viewing changes to module/t/upload.t

  • Committer: Bazaar Package Importer
  • Author(s): Steinar H. Gunderson
  • Date: 2010-02-28 15:51:47 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100228155147-dflwg59lhyittzi7
Tags: 2.12-1
* New upstream release.
* Switch to dpkg-source 3.0 (quilt) format.
  * Split the Debian diff into two separate patches, and remove spurious
    junk that shouldn't have been there.
  * In clean, remove some stray files distclean forgets.
* Update debhelper compatibility level to 7.
  * Update debhelper build-dependency version.
  * Use dh_prep instead of dh_clean -k.
* Update Standards-Version to 3.8.4.
  * Change from ${Source-Version} to ${binary:Version} in inter-package
    dependencies.
  * In debian/copyright, refer to the Apache 2.0 license file from
    common-licenses instead of having the entire license text in the file.
    Also include the actual copyright in the file.
* Put all binary packages in their correct respective sections.
* Add ${misc:Depends} to all binary packages, and remove ${shlibs:Depends}
  from the -dev and -doc packages (which don't have any shared libraries).
* Run dh_shlibdeps on all packages, using the -a flag.
* Don't ignore errors on distclean; check for Makefile instead.
* Don't use full path to a2dismod in libapache2-mod-apreq2.postrm.
* Run libapache2-mod-apreq2.postrm script under sh -e, so errors are not
  ignored.
* Install the man pages that used to conflict with libapache-request-perl,
  which is now not in the stable release anymore.
* Don't set PREFIX= at make install time; only set prefix=.
  Seemingly, PREFIX= has no real effect at that point.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use strict;
 
2
use warnings FATAL => 'all';
 
3
 
 
4
use Apache::Test;
 
5
use Apache::TestUtil;
 
6
use Apache::TestConfig;
 
7
use Apache::TestRequest qw(UPLOAD_BODY);
 
8
 
 
9
plan tests => 7, need_lwp;
 
10
 
 
11
my $location = "/apreq_upload_test";
 
12
 
 
13
my %files = (
 
14
             '1b'   => 1,
 
15
             '1k'   => 1024,
 
16
             '10k'  => 10240,
 
17
             '63k'  => 64512,
 
18
             '64k'  => 65536,
 
19
             '65k'  => 66560,
 
20
             '128k' => 131072,
 
21
            );
 
22
 
 
23
my $server_root = Apache::Test::config()->{vars}->{serverroot};
 
24
my $dir = "$server_root/c-modules/apreq_upload_test";
 
25
 
 
26
foreach my $file (sort { $files{$a} <=> $files{$b} } keys %files) {
 
27
    my $size = $files{$file};
 
28
 
 
29
    my $result = UPLOAD_BODY($location, filename => "$dir/$file");
 
30
    ok t_cmp(
 
31
             $result,
 
32
             $size,
 
33
             "UPLOAD a file size $size btyes"
 
34
             );
 
35
}