File: sdlpm.t

package info (click to toggle)
sdlperl 1.20.3dfsg-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,796 kB
  • ctags: 2,171
  • sloc: perl: 7,394; ansic: 232; makefile: 75; sh: 1
file content (24 lines) | stat: -rw-r--r-- 706 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl -w

use Test::More tests => 9;
use strict;
use vars qw/@INC/;

BEGIN
  {
  unshift @INC, ('../blib/lib');
  unshift @INC, ('../blib/arch');
  chdir 't' if -d 't';
  use_ok( 'SDL' ); 
  }
  
can_ok ('SDL', qw/in verify/);

is (SDL::in('foo','bar'), 0, "foo isn't in ('bar')");
is (SDL::in('foo','foo'), 1, "foo is in ('foo')");
is (SDL::in('foo','foo','bar'), 1, "foo is in ('foo','bar')");
is (SDL::in('foo','foo','bar','foo'), 1, "foo is once in ('foo','bar','foo')");
is (SDL::in('foo','fab','bar'), 0, "foo isn't in ('fab','bar')");
is (SDL::in('foo','fab',undef,'bar'), 0, "foo isn't in ('fab',undef,'bar')");
is (SDL::in('foo','fab',undef,'foo'), 1, "foo is in ('fab',undef,'foo')");