mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-23 21:08:29 +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
57
third_party/make/tests/scripts/functions/strip
vendored
Normal file
57
third_party/make/tests/scripts/functions/strip
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
# -*-perl-*-
|
||||
$description = "The following test creates a makefile to verify
|
||||
the ability of make to strip white space from lists of object.\n";
|
||||
|
||||
|
||||
$details = "The make file is built with a list of objects that contain white space
|
||||
These are then run through the strip command to remove it. This is then
|
||||
verified by echoing the result.\n";
|
||||
|
||||
open(MAKEFILE,"> $makefile");
|
||||
|
||||
# The Contents of the MAKEFILE ...
|
||||
|
||||
print MAKEFILE <<'EOMAKE';
|
||||
TEST1 := "Is this TERMINAL fun? What makes you believe is this terminal fun? JAPAN is a WONDERFUL planet -- I wonder if we will ever reach their level of COMPARATIVE SHOPPING..."
|
||||
E :=
|
||||
TEST2 := $E try this and this $E
|
||||
|
||||
define TEST3
|
||||
|
||||
and these test out
|
||||
|
||||
|
||||
some
|
||||
blank lines
|
||||
|
||||
|
||||
|
||||
endef
|
||||
|
||||
.PHONY: all
|
||||
all:
|
||||
@echo '$(strip $(TEST1) )'
|
||||
@echo '$(strip $(TEST2) )'
|
||||
@echo '$(strip $(TEST3) )'
|
||||
|
||||
space: ; @echo '$(strip ) $(strip )'
|
||||
|
||||
EOMAKE
|
||||
|
||||
# END of Contents of MAKEFILE
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
&run_make_with_options($makefile,"",&get_logfile);
|
||||
$answer = "\"Is this TERMINAL fun? What makes you believe is this terminal fun? JAPAN is a WONDERFUL planet -- I wonder if we will ever reach their level of COMPARATIVE SHOPPING...\"
|
||||
try this and this
|
||||
and these test out some blank lines
|
||||
";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
||||
|
||||
&run_make_with_options($makefile,"space",&get_logfile);
|
||||
$answer = " \n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
||||
1;
|
Loading…
Add table
Add a link
Reference in a new issue