File: export1.t

package info (click to toggle)
libtime-format-perl 1.11-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 248 kB
  • ctags: 34
  • sloc: perl: 522; makefile: 4
file content (18 lines) | stat: -rwxr-xr-x 736 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/perl -I..

use Test::More tests => 7;

BEGIN { $Time::Format::NOXS = 1 }
BEGIN { use_ok 'Time::Format' }

# hashes exported properly?
is ref tied %time, Time::Format    => '%time exported by default';
is ref tied %strftime, ''          => '%strftime not exported by default';
is ref tied %manip,    ''          => '%manip not exported by default';
eval {%strftime = ()};   # suppress "used only once" warning
eval {%manip    = ()};   # suppress "used only once" warning

# functions exported properly?
ok  defined &time_format            => 'time_format exported by default';
ok !defined &time_strftime          => 'time_strftime not exported by default';
ok !defined &time_manip             => 'time_manip not exported by default';