use 5.00503;
use strict;
use FindBin;
use lib "$FindBin::Bin/../lib";
use Test::Simply tests => 12;
use Stable::Module;

my $basename = '';

eval {
    $basename = basename('/usr/loƒ\al/bin/perl.pl');
};

ok(($basename eq 'perl.pl'), qq{basename('/usr/loƒ\al/bin/perl.pl') $^X @{[__FILE__]}});

if ($^O =~ m{\A (?:MSWin32|NetWare|symbian|dos) \z}oxms) {
    eval {
        $basename = basename('/usr/loƒ\al/bin/perl.pl','.pl');
    };

    ok(($basename eq 'perl'), qq{basename('/usr/loƒ\al/bin/perl.pl','.pl') $^X @{[__FILE__]}});
}
else {
    ok(1, qq{SKIP basename('/usr/loƒ\al/bin/perl.pl','.pl') $^X @{[__FILE__]}});
}

eval {
    $basename = basename('/usr/loƒ\al/bin/perl.pl','.txt');
};

ok(($basename eq 'perl.pl'), qq{basename('/usr/loƒ\al/bin/perl.pl','.txt') $^X @{[__FILE__]}});

if ($^O =~ m{\A (?:MSWin32|NetWare|symbian|dos) \z}oxms) {
    eval {
        $basename = basename('/usr/lo ƒ\ al/bin/pe rl.p l','.p l');
    };

    ok(($basename eq 'pe rl'), qq{basename('/usr/lo ƒ\ al/bin/pe rl.p l','.p l') $^X @{[__FILE__]}});
}
else {
    ok(1, qq{SKIP basename('/usr/lo ƒ\ al/bin/pe rl.p l','.p l') $^X @{[__FILE__]}});
}

eval {
    $basename = basename('/usr/loƒ\al/bin/pƒ\rl.pl');
};

ok(($basename eq 'pƒ\rl.pl'), qq{basename('/usr/loƒ\al/bin/pƒ\rl.pl') $^X @{[__FILE__]}});

if ($^O =~ m{\A (?:MSWin32|NetWare|symbian|dos) \z}oxms) {
    eval {
        $basename = basename('/usr/loƒ\al/bin/pƒ\rl.pl','.pl');
    };

    ok(($basename eq 'pƒ\rl'), qq{basename('/usr/loƒ\al/bin/pƒ\rl.pl','.pl') $^X @{[__FILE__]}});
}
else {
    ok(1, qq{SKIP basename('/usr/loƒ\al/bin/pƒ\rl.pl','.pl') $^X @{[__FILE__]}});
}

eval {
    $basename = basename('/usr/loƒ\al/bin/pƒ\rl.pl','.txt');
};

ok(($basename eq 'pƒ\rl.pl'), qq{basename('/usr/loƒ\al/bin/pƒ\rl.pl','.txt') $^X @{[__FILE__]}});

if ($^O =~ m{\A (?:MSWin32|NetWare|symbian|dos) \z}oxms) {
    eval {
        $basename = basename('/usr/lo ƒ\ al/bin/pƒ\ rl.p l','.p l');
    };

    ok(($basename eq 'pƒ\ rl'), qq{basename('/usr/lo ƒ\ al/bin/pƒ\ rl.p l','.p l') $^X @{[__FILE__]}});
}
else {
    ok(1, qq{SKIP basename('/usr/lo ƒ\ al/bin/pƒ\ rl.p l','.p l') $^X @{[__FILE__]}});
}

eval {
    $basename = basename('/usr/loƒ\al/bin/pƒ\rl.pƒ\');
};

ok(($basename eq 'pƒ\rl.pƒ\'), qq{basename('/usr/loƒ\al/bin/pƒ\rl.pƒ\') $^X @{[__FILE__]}});

if ($^O =~ m{\A (?:MSWin32|NetWare|symbian|dos) \z}oxms) {
    eval {
        $basename = basename('/usr/loƒ\al/bin/pƒ\rl.pƒ\','.pƒ\');
    };

    ok(($basename eq 'pƒ\rl'), qq{basename('/usr/loƒ\al/bin/pƒ\rl.pƒ\','.pƒ\') $^X @{[__FILE__]}});
}
else {
    ok(1, qq{SKIP basename('/usr/loƒ\al/bin/pƒ\rl.pƒ\','.pƒ\') $^X @{[__FILE__]}});
}

eval {
    $basename = basename('/usr/loƒ\al/bin/pƒ\rl.pƒ\','.txƒ\');
};

ok(($basename eq 'pƒ\rl.pƒ\'), qq{basename('/usr/loƒ\al/bin/pƒ\rl.pƒ\','.txƒ\') $^X @{[__FILE__]}});

if ($^O =~ m{\A (?:MSWin32|NetWare|symbian|dos) \z}oxms) {
    eval {
        $basename = basename('/usr/lo ƒ\ al/bin/pƒ\ rl.p ƒ\','.p ƒ\');
    };

    ok(($basename eq 'pƒ\ rl'), qq{basename('/usr/lo ƒ\ al/bin/pƒ\ rl.p ƒ\','.p ƒ\') $^X @{[__FILE__]}});
}
else {
    ok(1, qq{SKIP basename('/usr/lo ƒ\ al/bin/pƒ\ rl.p ƒ\','.p ƒ\') $^X @{[__FILE__]}});
}

__END__
