# HG changeset patch # User Sergey Kandaurov # Date 1533119715 -10800 # Node ID 6efe4dbf713bc5a4916df730318b83304370aafa # Parent 28ba4b465635f7e62be1491e373128d1a9afd905 Tests: added dav copy test with existing destination file. diff --git a/dav.t b/dav.t --- a/dav.t +++ b/dav.t @@ -21,7 +21,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http dav/)->plan(18); +my $t = Test::Nginx->new()->has(qw/http dav/)->plan(20); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -149,6 +149,25 @@ like($r, qr/204 No Content/, 'copy file is(-s $t->testdir() . '/file-moved escape', 10, 'file copied unescaped'); +$t->write_file('file.exist', join '', (1 .. 42)); + +$r = http(<has_version('1.15.3'); + +is(-s $t->testdir() . '/file.exist', 10, 'target file truncated'); + +} + $r = http(<