diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/option--implicit-cache.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/option--implicit-cache.py b/test/option--implicit-cache.py index d6ca15c..4e5cf1e 100644 --- a/test/option--implicit-cache.py +++ b/test/option--implicit-cache.py @@ -297,4 +297,35 @@ assert string.find(test.stdout(), 'is up to date') != -1, test.stdout() test.run(arguments = variant_prog) assert string.find(test.stdout(), 'is up to date') == -1, test.stdout() +# Test forcing rescanning: +test.write(['include', 'foo.h'], +r""" +#define FOO_STRING "include/foo.h 3\n" +#include "bar.h" +""") + +test.run(arguments = "--implicit-cache " + args) + +test.write(['include', 'foo.h'], +r""" +#define FOO_STRING "include/foo.h 3\n" +#include "baz.h" +#include "bar.h" +""") + +test.run(arguments = "--implicit-deps-unchanged " + variant_prog) +assert string.find(test.stdout(), 'is up to date') == -1, test.stdout() + +test.write(['include', 'baz.h'], +r""" +#define BAZ_STRING "include/baz.h 2\n" +""") + +test.run(arguments = "--implicit-deps-unchanged " + variant_prog) +assert string.find(test.stdout(), 'is up to date') != -1, test.stdout() + +test.run(arguments = "--implicit-deps-changed " + variant_prog) +assert string.find(test.stdout(), 'is up to date') == -1, test.stdout() + + test.pass_test() |
