11 plan skip_all => "POSIX is unavailable" if $Config{'extensions'} !~ m!\bPOSIX\b!;
17 my @getters = qw(getcflag getiflag getispeed getlflag getoflag getospeed);
19 plan tests => 3 + 2 * (3 + NCCS() + @getters);
24 my $termios = eval { POSIX::Termios->new };
25 is( $@, '', "calling POSIX::Termios->new" );
26 ok( defined $termios, "\tchecking if the object is defined" );
27 isa_ok( $termios, "POSIX::Termios", "\tchecking the type of the object" );
31 $r = eval { $termios->getattr($i) };
32 is( $@, '', "calling getattr($i)" );
33 ok( defined $r, "\tchecking if the returned value is defined: $r" );
37 for my $i (0..NCCS()-1) {
38 $r = eval { $termios->getcc($i) };
39 is( $@, '', "calling getcc($i)" );
40 ok( defined $r, "\tchecking if the returned value is defined: $r" );
44 for my $method (@getters) {
45 $r = eval { $termios->$method() };
46 is( $@, '', "calling $method()" );
47 ok( defined $r, "\tchecking if the returned value is defined: $r" );