# This file is encoded in HP-15.
die "This file is not encoded in HP-15.\n" if q{あ} ne "\x82\xa0";

my $__FILE__ = __FILE__;

use Char::HP15;
print "1..2\n";

if ($^O !~ /\A (?: MSWin32 | NetWare | symbian | dos ) \z/oxms) {
    print "ok - 1 # SKIP $^X $0\n";
    print "ok - 2 # SKIP $^X $0\n";
    exit;
}

if ($ENV{'PERL5SHELL'} =~ /Win95Cmd\.exe/xmsi) {
    print "ok - 1 # SKIP $^X $0\n";
    print "ok - 2 # SKIP $^X $0\n";
    exit;
}

my @qx = ();

mkdir('directory',0777);
system('echo 1 >directory\\qx.txt');
if (($ENV{'PERL5SHELL'}||$ENV{'COMSPEC'}) =~ / \\COMMAND\.COM \z/oxmsi) {
    @qx = split /\n/, `dir /b directory`;
}
else{
    @qx = split /\n/, `dir /b directory 2>NUL`;
}
if (@qx) {
    print "ok - 1 qx $^X $__FILE__\n";
}
else {
    print "not ok - 1 qx: $! $^X $__FILE__\n";
}
system('del directory\\qx.txt');
rmdir('directory');

mkdir('D機能',0777);
system('echo 1 >D機能\\qx.txt');
if (($ENV{'PERL5SHELL'}||$ENV{'COMSPEC'}) =~ / \\COMMAND\.COM \z/oxmsi) {
    @qx = split /\n/, `dir /b D機能`;
}
else{
    @qx = split /\n/, `dir /b D機能 2>NUL`;
}
if (@qx) {
    print "ok - 2 qx $^X $__FILE__\n";
}
else {
    print "not ok - 2 qx: $! $^X $__FILE__\n";
}
system('del D機能\\qx.txt');
rmdir('D機能');

__END__
