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

📄 wildcard

📁 Linux 下的编译工具
💻
字号:
#                                                                    -*-perl-*-$description = "The following test creates a makefile to test wildcardexpansions and the ability to put a command on the sameline as the target name separated by a semi-colon.";$details = "\This test creates 4 files by the names of 1.example,two.example and 3.example.  We execute three tests.  The firstexecutes the print1 target which tests the '*' wildcard byechoing all filenames by the name of '*.example'.  The secondtest echo's all files which match '?.example' and[a-z0-9].example.  Lastly we clean up all of the files usingthe '*' wildcard as in the first test";open(MAKEFILE,"> $makefile");# The Contents of the MAKEFILE ...print MAKEFILE <<EOM;.PHONY: print1 print2 cleanprint1: ;\@echo \$(sort \$(wildcard example.*))print2:\t\@echo \$(sort \$(wildcard example.?))\t\@echo \$(sort \$(wildcard example.[a-z0-9]))\t\@echo \$(sort \$(wildcard example.[!A-Za-z_\\!]))clean:\t$delete_command \$(sort \$(wildcard example.*))EOM# END of Contents of MAKEFILEclose(MAKEFILE);&touch("example.1");&touch("example.two");&touch("example.3");&touch("example.for");&touch("example._");# TEST #1# -------$answer = "example.1 example.3 example._ example.for example.two\n";&run_make_with_options($makefile,"print1",&get_logfile);&compare_output($answer,&get_logfile(1));# TEST #2# -------$answer = "example.1 example.3 example._\n"         ."example.1 example.3\n"         ."example.1 example.3\n";&run_make_with_options($makefile,"print2",&get_logfile);&compare_output($answer,&get_logfile(1));# TEST #3# -------$answer = "$delete_command example.1 example.3 example._ example.for example.two";if ($vos){   $answer .= " \n";}else{   $answer .= "\n";}&run_make_with_options($makefile,"clean",&get_logfile);if ((-f "example.1")||(-f "example.two")||(-f "example.3")||(-f "example.for")) {   $test_passed = 0;}&compare_output($answer,&get_logfile(1));1;

⌨️ 快捷键说明

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