summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins@gmail.com>2015-05-18 03:38:23 (GMT)
committerWilliam Blevins <wblevins@gmail.com>2015-05-18 03:38:23 (GMT)
commit279caec8f29b92cc569be83eb7b0c7a271136ad4 (patch)
tree3c9145bc9f48945012640053a697769999c74a3e /test
parentb27b2316842dfa291feef332c80f676fd097d809 (diff)
downloadSCons-279caec8f29b92cc569be83eb7b0c7a271136ad4.zip
SCons-279caec8f29b92cc569be83eb7b0c7a271136ad4.tar.gz
SCons-279caec8f29b92cc569be83eb7b0c7a271136ad4.tar.bz2
Issue 2264: Updated tests to reflect Node changes.
Diffstat (limited to 'test')
-rw-r--r--test/Fortran/FORTRANSUFFIXES.py56
-rw-r--r--test/QT/manual.py6
-rw-r--r--test/Scanner/exception.py14
-rw-r--r--test/Scanner/generated.py1
4 files changed, 40 insertions, 37 deletions
diff --git a/test/Fortran/FORTRANSUFFIXES.py b/test/Fortran/FORTRANSUFFIXES.py
index 583b71b..9673e6f 100644
--- a/test/Fortran/FORTRANSUFFIXES.py
+++ b/test/Fortran/FORTRANSUFFIXES.py
@@ -56,51 +56,51 @@ env = Environment(FORTRANPATH = ['.'],
env.Append(FORTRANSUFFIXES = ['.x'])
env.Object(target = 'test1', source = 'test1.f')
env.InstallAs('test1_f', 'test1.f')
-env.InstallAs('test1_h', 'test1.h')
env.InstallAs('test1_x', 'test1.x')
+env.InstallAs('test2_f', 'test2.f')
""" % locals())
test.write('test1.f', """\
test1.f 1
- INCLUDE 'test1.h'
+ INCLUDE 'test2.f'
INCLUDE 'test1.x'
""")
-test.write('test1.h', """\
- test1.h 1
- INCLUDE 'foo.h'
+test.write('test2.f', """\
+ test2.f 1
+ INCLUDE 'foo.f'
""")
test.write('test1.x', """\
test1.x 1
- INCLUDE 'foo.h'
+ INCLUDE 'foo.f'
""")
-test.write('foo.h', """\
- foo.h 1
+test.write('foo.f', """\
+ foo.f 1
""")
expect = test.wrap_stdout("""\
%(_python_)s myfc.py test1.o test1.f
Install file: "test1.f" as "test1_f"
-Install file: "test1.h" as "test1_h"
Install file: "test1.x" as "test1_x"
+Install file: "test2.f" as "test2_f"
""" % locals())
test.run(arguments='.', stdout=expect)
test.must_match('test1.o', """\
test1.f 1
- test1.h 1
- foo.h 1
+ test2.f 1
+ foo.f 1
test1.x 1
- foo.h 1
+ foo.f 1
""")
test.up_to_date(arguments='.')
-test.write('foo.h', """\
- foo.h 2
+test.write('foo.f', """\
+ foo.f 2
""")
expect = test.wrap_stdout("""\
@@ -111,17 +111,17 @@ test.run(arguments='.', stdout=expect)
test.must_match('test1.o', """\
test1.f 1
- test1.h 1
- foo.h 2
+ test2.f 1
+ foo.f 2
test1.x 1
- foo.h 2
+ foo.f 2
""")
test.up_to_date(arguments='.')
test.write('test1.x', """\
test1.x 2
- INCLUDE 'foo.h'
+ INCLUDE 'foo.f'
""")
expect = test.wrap_stdout("""\
@@ -133,32 +133,32 @@ test.run(arguments='.', stdout=expect)
test.must_match('test1.o', """\
test1.f 1
- test1.h 1
- foo.h 2
+ test2.f 1
+ foo.f 2
test1.x 2
- foo.h 2
+ foo.f 2
""")
test.up_to_date(arguments='.')
-test.write('test1.h', """\
- test1.h 2
- INCLUDE 'foo.h'
+test.write('test2.f', """\
+ test2.f 2
+ INCLUDE 'foo.f'
""")
expect = test.wrap_stdout("""\
%(_python_)s myfc.py test1.o test1.f
-Install file: "test1.h" as "test1_h"
+Install file: "test2.f" as "test2_f"
""" % locals())
test.run(arguments='.', stdout=expect)
test.must_match('test1.o', """\
test1.f 1
- test1.h 2
- foo.h 2
+ test2.f 2
+ foo.f 2
test1.x 2
- foo.h 2
+ foo.f 2
""")
test.up_to_date(arguments='.')
diff --git a/test/QT/manual.py b/test/QT/manual.py
index ff38f32..d911fb3 100644
--- a/test/QT/manual.py
+++ b/test/QT/manual.py
@@ -46,13 +46,15 @@ sources = ['aaa.cpp', 'bbb.cpp', 'ddd.cpp', 'eee.cpp', 'main.cpp']
# normal invocation
sources.append(env.Moc('include/aaa.h'))
-env.Moc('bbb.cpp')
+moc = env.Moc('bbb.cpp')
+env.Ignore( moc, moc )
sources.extend(env.Uic('ui/ccc.ui')[1:])
# manual target specification
sources.append(env.Moc('moc-ddd.cpp', 'include/ddd.h',
QT_MOCHPREFIX='')) # Watch out !
-env.Moc('moc_eee.cpp', 'eee.cpp')
+moc = env.Moc('moc_eee.cpp', 'eee.cpp')
+env.Ignore( moc, moc )
sources.extend(env.Uic(['include/uic_fff.hpp', 'fff.cpp', 'fff.moc.cpp'],
'ui/fff.ui')[1:])
diff --git a/test/Scanner/exception.py b/test/Scanner/exception.py
index 1a14152..de0a795 100644
--- a/test/Scanner/exception.py
+++ b/test/Scanner/exception.py
@@ -83,23 +83,23 @@ env.Cat('bar', bar_in)
test.write('foo.k',
"""foo.k 1 line 1
-include xxx
-include yyy
+include xxx.k
+include yyy.k
foo.k 1 line 4
""")
test.write('bar.in',
-"""include yyy
+"""include yyy.k
bar.in 1 line 2
bar.in 1 line 3
-include zzz
+include zzz.k
""")
-test.write('xxx', "xxx 1\n")
+test.write('xxx.k', "xxx 1\n")
-test.write('yyy', "exception yyy 1\n")
+test.write('yyy.k', "exception yyy 1\n")
-test.write('zzz', "zzz 1\n")
+test.write('zzz.k', "zzz 1\n")
test.run(arguments = '.',
status = 2,
diff --git a/test/Scanner/generated.py b/test/Scanner/generated.py
index 845111c..b41c7c8 100644
--- a/test/Scanner/generated.py
+++ b/test/Scanner/generated.py
@@ -338,6 +338,7 @@ class CScannerCounter(object):
import SCons.Tool
MyCScanner = CScannerCounter(SCons.Script.CScanner)
SCons.Tool.SourceFileScanner.add_scanner('.c', MyCScanner)
+SCons.Tool.SourceFileScanner.add_scanner('.h', MyCScanner)
env = Environment(CPPPATH = ".")
l = env.StaticLibrary("g", Split("libg_1.c libg_2.c libg_3.c"))