⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 case.t

📁 source of perl for linux application,
💻 T
字号:
#!./perlBEGIN {    chdir 't' if -d 't';    if ($^O eq 'MacOS') { 	@INC = qw(: ::lib ::macos:lib);     } else { 	@INC = '.'; 	push @INC, '../lib';     }    require Config; import Config;    if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) {        print "1..0\n";        exit 0;    }    print "1..7\n";}END {    print "not ok 1\n" unless $loaded;}use File::Glob qw(:glob csh_glob);$loaded = 1;print "ok 1\n";my $pat = $^O eq "MacOS" ? ":op:G*.t" : "op/G*.t";# Test the actual use of the case sensitivity tags, via csh_glob()import File::Glob ':nocase';@a = csh_glob($pat);print "not " unless @a >= 8;print "ok 2\n";# This may fail on systems which are not case-PRESERVINGimport File::Glob ':case';@a = csh_glob($pat); # None should be uppercaseprint "not " unless @a == 0;print "ok 3\n";# Test the explicit use of the GLOB_NOCASE flag@a = bsd_glob($pat, GLOB_NOCASE);print "not " unless @a >= 3;print "ok 4\n";# Test Win32 backslash nastiness...if ($^O ne 'MSWin32' && $^O ne 'NetWare') {    print "ok 5\nok 6\nok 7\n";}else {    @a = File::Glob::glob("op\\g*.t");    print "not " unless @a >= 8;    print "ok 5\n";    mkdir "[]", 0;    @a = File::Glob::glob("\\[\\]", GLOB_QUOTE);    rmdir "[]";    print "# returned @a\nnot " unless @a == 1;    print "ok 6\n";    @a = bsd_glob("op\\*", GLOB_QUOTE);    print "not " if @a == 0;    print "ok 7\n";}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -