File: 14_uninitialised.t

package info (click to toggle)
libipc-system-simple-perl 1.30-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 256 kB
  • sloc: perl: 908; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl -w
use strict;
use warnings;
use Test::More;

use IPC::System::Simple qw(systemx);

eval "use Test::NoWarnings qw(had_no_warnings clear_warnings)";

plan skip_all => "Test::NoWarnings required for testing undef warnings" if $@;

plan 'no_plan';

# Passing undef to system functions should produce a nice message,
# not a warning and a malformed message.


eval {
    systemx(undef,1);
};

like($@, qr/undef/, "systemx() should check for undef");