gopher-server: add a test for large uploads

This commit is contained in:
Alex Schroeder
2018-01-05 11:25:55 +01:00
parent e5b46fe1a4
commit 50fcd7eb0b

View File

@@ -270,4 +270,11 @@ like($copy, qr/\211PNG\r\n/, "Image copy download");
is($copy, $image, "Image and copy are identical");
# Test large pages
my $garbage = (("0123456789" x 8) . "\n") x 1000 . "Last Line";
$page = query_gopher("Large/write/text", "$garbage");
like($page, qr/^iPage was saved./m, "Write large page");
$page = query_gopher("Large");
like($page, qr/Last Line/m, "Read large page");
done_testing();