File: 003_coremod.t

package info (click to toggle)
libmodule-optional-perl 0.03-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 140 kB
  • sloc: perl: 102; makefile: 2
file content (52 lines) | stat: -rw-r--r-- 732 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- perl -*-

# t/001_basic.t - Optional core module - should be there!

use Test::More tests => 2;

package File::Spec::Functions::Dummy;

use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);

require Exporter;

@ISA = qw(Exporter);

@EXPORT = qw(
	canonpath
	catdir
	catfile
	curdir
	rootdir
	updir
	no_upwards
	file_name_is_absolute
	path
);

@EXPORT_OK = qw(
	devnull
	tmpdir
	splitpath
	splitdir
	catpath
	abs2rel
	rel2abs
	case_tolerant
);

%EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );


sub curdir {
	die "Ouch! should be calling the one in F::S::F";
}

package main;
use strict;

BEGIN { use_ok( 'Module::Optional', 'File::Spec::Functions' ); }

#02
like(curdir(), qr/\.|\[\]/, "curdir returned something sensible");