Imported Upstream version 4.4
[platform/upstream/make.git] / tests / scripts / features / dircache
1 #                                                               -*-mode: perl-*-
2
3 $description = "Test the directory cache behavior.";
4
5 # The first wildcard should bring the entire directory into the cache Then we
6 # create a new file "behind make's back" then see if the next wildcard detects
7 # it.
8
9 run_make_test(q!
10 _orig := $(wildcard ./*)
11 $(shell echo > anewfile)
12 _new := $(wildcard ./*)
13 $(info diff=$(filter-out $(_orig),$(_new)))
14 all:;@:
15 !,
16               '', "diff=./anewfile\n");
17
18 rmfiles('anewfile');
19
20 run_make_test(q!
21 _orig := $(wildcard ./*)
22 $(file >anewfile)
23 _new := $(wildcard ./*)
24 $(info diff=$(filter-out $(_orig),$(_new)))
25 all:;@:
26 !,
27               '', "diff=./anewfile\n");
28
29 rmfiles('anewfile');
30
31 1;