mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-18 02:22:30 +00:00
add make-4.3.tar.gz
This commit is contained in:
parent
0a0997a872
commit
19f70a154e
458 changed files with 239669 additions and 0 deletions
33
third_party/make/tests/scripts/functions/if
vendored
Normal file
33
third_party/make/tests/scripts/functions/if
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
# -*-perl-*-
|
||||
$description = "Test the if function.\n";
|
||||
|
||||
$details = "Try various uses of if and ensure they all give the correct
|
||||
results.\n";
|
||||
|
||||
open(MAKEFILE, "> $makefile");
|
||||
|
||||
print MAKEFILE <<EOMAKE;
|
||||
NEQ = \$(subst \$1,,\$2)
|
||||
e =
|
||||
|
||||
all:
|
||||
\t\@echo 1 \$(if ,true,false)
|
||||
\t\@echo 2 \$(if ,true,)
|
||||
\t\@echo 3 \$(if ,true)
|
||||
\t\@echo 4 \$(if z,true,false)
|
||||
\t\@echo 5 \$(if z,true,\$(shell echo hi))
|
||||
\t\@echo 6 \$(if ,\$(shell echo hi),false)
|
||||
\t\@echo 7 \$(if \$(call NEQ,a,b),true,false)
|
||||
\t\@echo 8 \$(if \$(call NEQ,a,a),true,false)
|
||||
\t\@echo 9 \$(if z,true,fal,se) hi
|
||||
\t\@echo 10 \$(if ,true,fal,se)there
|
||||
\t\@echo 11 \$(if \$(e) ,true,false)
|
||||
EOMAKE
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
&run_make_with_options($makefile, "", &get_logfile);
|
||||
$answer = "1 false\n2\n3\n4 true\n5 true\n6 false\n7 true\n8 false\n9 true hi\n10 fal,sethere\n11 false\n";
|
||||
&compare_output($answer, &get_logfile(1));
|
||||
|
||||
1;
|
Loading…
Add table
Add a link
Reference in a new issue