diff options
author | Daniel Moody <dmoody256@gmail.com> | 2022-05-26 00:28:13 -0500 |
---|---|---|
committer | Daniel Moody <dmoody256@gmail.com> | 2022-05-26 00:28:13 -0500 |
commit | 1899835f95765dff0cbb5f3bacbae8095e8975c6 (patch) | |
tree | 08983038cb1f7f85ae97d9ad178ef4a8937e85b6 /test/Configure | |
parent | 59c4623c943b1ec083ed2f1857a1f699d3be9c6a (diff) | |
download | scons-git-1899835f95765dff0cbb5f3bacbae8095e8975c6.tar.gz |
update test to test real source with no deps
Diffstat (limited to 'test/Configure')
-rw-r--r-- | test/Configure/conftest_source_file.py | 15 | ||||
-rw-r--r-- | test/Configure/conftest_source_file/SConstruct | 1 | ||||
-rw-r--r-- | test/Configure/conftest_source_file/header3.h | 2 |
3 files changed, 15 insertions, 3 deletions
diff --git a/test/Configure/conftest_source_file.py b/test/Configure/conftest_source_file.py index 451d06ac4..c5c593e67 100644 --- a/test/Configure/conftest_source_file.py +++ b/test/Configure/conftest_source_file.py @@ -28,6 +28,8 @@ Template for end-to-end test file. Replace this with a description of the test. """ +import textwrap + import TestSCons test = TestSCons.TestSCons() @@ -36,16 +38,23 @@ test.dir_fixture("conftest_source_file") test.run(arguments='.') +conf_text = textwrap.dedent("""\ + Checking for C header file header1.h... {cached1}yes + Checking for C header file header3.h... {cached3}yes +""") + +test.up_to_date(read_str=conf_text.format(cached1='(cached) ', cached3='(cached) ')) + test.write('header2.h', """ #pragma once int test_header = 2; """) -test.not_up_to_date(read_str="Checking for C header file header1.h... (cached) yes\n") +test.not_up_to_date(read_str=conf_text.format(cached1='(cached) ', cached3='(cached) ')) -test.up_to_date(read_str="Checking for C header file header1.h... yes\n") +test.up_to_date(read_str=conf_text.format(cached1='', cached3='(cached) ')) -test.up_to_date(read_str="Checking for C header file header1.h... (cached) yes\n") +test.up_to_date(read_str=conf_text.format(cached1='(cached) ', cached3='(cached) ')) test.pass_test() diff --git a/test/Configure/conftest_source_file/SConstruct b/test/Configure/conftest_source_file/SConstruct index 72f052261..2e0b6721a 100644 --- a/test/Configure/conftest_source_file/SConstruct +++ b/test/Configure/conftest_source_file/SConstruct @@ -2,5 +2,6 @@ env = Environment() env.Append(CPPPATH=['.']) conf1 = Configure(env) conf1.CheckHeader("header1.h") +conf1.CheckHeader("header3.h") conf1.Finish() env.Program('out', 'main.c')
\ No newline at end of file diff --git a/test/Configure/conftest_source_file/header3.h b/test/Configure/conftest_source_file/header3.h new file mode 100644 index 000000000..dc4359efd --- /dev/null +++ b/test/Configure/conftest_source_file/header3.h @@ -0,0 +1,2 @@ +#pragma once +int test_header = 3;
\ No newline at end of file |