mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-31 18:46:02 +00:00
Allow multiple curl requests per test file
This could still do with some more work to allow clearing previous settings, it does now allow repeated URL lines per test file.
This commit is contained in:
parent
1077714a83
commit
341707b045
@ -377,24 +377,25 @@ exit(0);
|
||||
sub run_curl {
|
||||
my $url = shift;
|
||||
|
||||
push @arguments, @auth;
|
||||
my @args = @arguments;
|
||||
push @args, @auth;
|
||||
|
||||
if ( -f $datafile ) {
|
||||
push @arguments, "--data-binary", "\@$datafile";
|
||||
push @args, "--data-binary", "\@$datafile";
|
||||
}
|
||||
elsif ( defined($data_binary) ) {
|
||||
push @arguments, "--data-binary", $data_binary;
|
||||
push @args, "--data-binary", $data_binary;
|
||||
}
|
||||
else {
|
||||
undef($datafile);
|
||||
}
|
||||
|
||||
push @arguments, $url;
|
||||
push @args, $url;
|
||||
|
||||
warn join " ", "curl", @arguments, "\n"
|
||||
warn join " ", "curl", @args, "\n"
|
||||
if $debug;
|
||||
|
||||
open RESULTS, "-|", "curl", @arguments;
|
||||
open RESULTS, "-|", "curl", @args;
|
||||
while ( <RESULTS> ) {
|
||||
my $line = $_;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user