]> sjero.net Git - wget/commitdiff
Add port substitution for FTP to tests.
authorSteven Schubiger <stsc@member.fsf.org>
Thu, 25 Feb 2010 20:47:53 +0000 (21:47 +0100)
committerSteven Schubiger <stsc@member.fsf.org>
Thu, 25 Feb 2010 20:47:53 +0000 (21:47 +0100)
tests/ChangeLog
tests/FTPServer.pm

index e9a4c76a5f8cafa11d7af121c372a27b7e2e308e..a2b739d5e1598d4e914a72e7d510f29a00424037 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-25  Steven Schubiger  <stsc@member.fsf.org>
+
+       * FTPServer.pm (FTPServer::new): Substitute port placeholders
+       in content of files to be retrieved via FTP.
+
 2009-10-14  Steven Schubiger  <stsc@member.fsf.org>
 
        * Test-E-k-K.px, Test-cookies-401.px, Test-ftp-bad-list.px,
 2009-10-14  Steven Schubiger  <stsc@member.fsf.org>
 
        * Test-E-k-K.px, Test-cookies-401.px, Test-ftp-bad-list.px,
index 2758ab1e5abdf0956f268b0857fd76f599c4ee7e..87e7983977f897ae78fb3148d3f164c0cdccaa8b 100644 (file)
@@ -489,6 +489,12 @@ sub new {
                                              Proto => 'tcp',
                                              Type => SOCK_STREAM)
                                         or die "bind: $!";
                                              Proto => 'tcp',
                                              Type => SOCK_STREAM)
                                         or die "bind: $!";
+
+    foreach my $file (keys %{$self->{_input}}) {
+        my $ref = \$self->{_input}{$file}{content};
+        $$ref =~ s/{{port}}/$self->sockport/eg;
+    }
+
     return $self;
 }
 
     return $self;
 }