tests: use a more portable null device path

- Use File::Spec->devnull() to get the null device path.

Prior to this change we used NUL for Windows native perl and /dev/null
otherwise.

Bug: https://github.com/curl/curl/pull/16929#discussion_r2025718160
Reported-by: Viktor Szakats

Closes https://github.com/curl/curl/pull/16930
This commit is contained in:
Jay Satiro 2025-04-02 23:16:49 -04:00
parent c871dcb612
commit 997e55d5a7
4 changed files with 9 additions and 4 deletions

View file

@ -29,6 +29,7 @@
use Cwd;
use Cwd 'abs_path';
use File::Basename;
use File::Spec;
my $logdir = "log";
my $pidfile = "$logdir/nghttpx.pid";
@ -38,7 +39,7 @@ my $listenport = 9017;
my $connect = "127.0.0.1,8990";
my $cert = "test-localhost";
my $conf = "nghttpx.conf";
my $dev_null = ($^O eq 'MSWin32' ? 'NUL' : '/dev/null');
my $dev_null = File::Spec->devnull();
#***************************************************************************
# Process command line options