File: _is_name.t

package info (click to toggle)
libchemistry-elements-perl 1.081-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 276 kB
  • sloc: perl: 774; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 534 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
#!/usr/bin/perl

package Chemistry::Elements;

use Test::More 'no_plan';

my $class = 'Chemistry::Elements';
my $sub   = '_is_name';

use_ok( $class );
ok( defined &{"${class}::$sub"}, "$sub defined" );


ok( _is_name( 'Oxygen'   ), "Oxygen is a name"   );
ok( _is_name( 'Xygenoai' ), "Xygenoai is a name" );

ok( ! _is_name( '' ),    "empty string isn't a name" );
ok( ! _is_name( undef ), "undef isn't a name"        );
ok( ! _is_name( 'Foo' ), "Foo isn't a name"          );
ok( ! _is_name( 'Po' ),  "Po isn't a name"           );