mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-22 12:28:31 +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
38
third_party/make/tests/scripts/functions/substitution
vendored
Normal file
38
third_party/make/tests/scripts/functions/substitution
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
# -*-perl-*-
|
||||
|
||||
$description = "Test the subst and patsubst functions";
|
||||
|
||||
$details = "";
|
||||
|
||||
# Generic patsubst test: test both the function and variable form.
|
||||
|
||||
run_make_test('
|
||||
foo := a.o b.o c.o
|
||||
bar := $(foo:.o=.c)
|
||||
bar2:= $(foo:%.o=%.c)
|
||||
bar3:= $(patsubst %.c,%.o,x.c.c bar.c)
|
||||
all:;@echo $(bar); echo $(bar2); echo $(bar3)',
|
||||
'',
|
||||
'a.c b.c c.c
|
||||
a.c b.c c.c
|
||||
x.c.o bar.o');
|
||||
|
||||
# Patsubst without '%'--shouldn't match because the whole word has to match
|
||||
# in patsubst. Based on a bug report by Markus Mauhart <qwe123@chello.at>
|
||||
|
||||
run_make_test('all:;@echo $(patsubst Foo,Repl,FooFoo)', '', 'FooFoo');
|
||||
|
||||
# Variable subst where a pattern matches multiple times in a single word.
|
||||
# Based on a bug report by Markus Mauhart <qwe123@chello.at>
|
||||
|
||||
run_make_test('
|
||||
A := fooBARfooBARfoo
|
||||
all:;@echo $(A:fooBARfoo=REPL)', '', 'fooBARREPL');
|
||||
|
||||
1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue