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

📄 magic.t

📁 早期freebsd实现
💻 T
字号:
#!./perl# $Header: magic.t,v 4.0 91/03/20 01:53:35 lwall Locked $$| = 1;		# command bufferingprint "1..5\n";eval '$ENV{"foo"} = "hi there";';	# check that ENV is inited inside evalif (`echo \$foo` eq "hi there\n") {print "ok 1\n";} else {print "not ok 1\n";}unlink 'ajslkdfpqjsjfk';$! = 0;open(foo,'ajslkdfpqjsjfk');if ($! == 2) {print "ok 2\n";} else {print "not ok 2\n";}# the next tests are embedded inside system simply because sh spits out# a newline onto stderr when a child process kills itself with SIGINT.system './perl','-e', '$| = 1;		# command buffering','-e', '$SIG{"INT"} = "ok3"; kill 2,$$;','-e', '$SIG{"INT"} = "IGNORE"; kill 2,$$; print "ok 4\n";','-e', '$SIG{"INT"} = "DEFAULT"; kill 2,$$; print "not ok\n";','-e', 'sub ok3 { print "ok 3\n" if pop(@_) eq "INT"; }';@val1 = @ENV{keys(%ENV)};	# can we slice ENV?@val2 = values(%ENV);print join(':',@val1) eq join(':',@val2) ? "ok 5\n" : "not ok 5\n";

⌨️ 快捷键说明

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