Loading tests/FILEFORMAT +8 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,14 @@ in the libtest/ directory. test case description </name> <setenv> variable1=contents1 variable2=contents2 Set the given environment variables to the specified value before the actual command is run, they are clear again after the command has been run. </setenv> <command [option=no-output]> command line to run, there's a bunch of %variables that get replaced accordingly. more about them elsewhere Loading tests/runtests.pl +28 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,29 @@ sub singletest { writearray($FTPDCMD, \@ftpservercmd); } my (@setenv)= getpart("client", "setenv"); my @envs; my $s; for $s (@setenv) { chomp $s; # cut off the newline subVariables \$s; print "MOO: $s\n"; if($s =~ /([^=]*)=(.*)/) { my ($var, $content)=($1, $2); $ENV{$var}=$content; print "setenv $var to $content\n"; # remember which, so that we can clear them afterwards! push @envs, $var; } } # get the command line options to use my ($cmd, @blaha)= getpart("client", "command"); Loading Loading @@ -720,6 +743,11 @@ sub singletest { # remove the special FTP command file after each test! unlink($FTPDCMD); my $e; for $e (@envs) { $ENV{$e}=""; # clean up } my @err = getpart("verify", "errorcode"); my $errorcode = $err[0]; Loading Loading
tests/FILEFORMAT +8 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,14 @@ in the libtest/ directory. test case description </name> <setenv> variable1=contents1 variable2=contents2 Set the given environment variables to the specified value before the actual command is run, they are clear again after the command has been run. </setenv> <command [option=no-output]> command line to run, there's a bunch of %variables that get replaced accordingly. more about them elsewhere Loading
tests/runtests.pl +28 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,29 @@ sub singletest { writearray($FTPDCMD, \@ftpservercmd); } my (@setenv)= getpart("client", "setenv"); my @envs; my $s; for $s (@setenv) { chomp $s; # cut off the newline subVariables \$s; print "MOO: $s\n"; if($s =~ /([^=]*)=(.*)/) { my ($var, $content)=($1, $2); $ENV{$var}=$content; print "setenv $var to $content\n"; # remember which, so that we can clear them afterwards! push @envs, $var; } } # get the command line options to use my ($cmd, @blaha)= getpart("client", "command"); Loading Loading @@ -720,6 +743,11 @@ sub singletest { # remove the special FTP command file after each test! unlink($FTPDCMD); my $e; for $e (@envs) { $ENV{$e}=""; # clean up } my @err = getpart("verify", "errorcode"); my $errorcode = $err[0]; Loading