diff options
| author | Steven Knight <knight@baldmt.com> | 2004-11-13 21:56:57 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2004-11-13 21:56:57 (GMT) |
| commit | 09cad6ed1ffb436742adbbf6608bb094b4a236e2 (patch) | |
| tree | b6c4b1f529c82d39dab94b26fb1440980955c8fe /src/engine/SCons/EnvironmentTests.py | |
| parent | 206adf4366654b0c3fcf8c9131140f0c11ae0a5f (diff) | |
| download | SCons-09cad6ed1ffb436742adbbf6608bb094b4a236e2.zip SCons-09cad6ed1ffb436742adbbf6608bb094b4a236e2.tar.gz SCons-09cad6ed1ffb436742adbbf6608bb094b4a236e2.tar.bz2 | |
Allow Alias Nodes to have Actions.
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
| -rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 0a0f260..9b84f3c 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -1797,6 +1797,7 @@ f5: \ tgt = env.Alias('new_alias')[0] assert str(tgt) == 'new_alias', tgt assert tgt.sources == [], tgt.sources + assert not hasattr(tgt, 'builder'), tgt.builder tgt = env.Alias('None_alias', None)[0] assert str(tgt) == 'None_alias', tgt @@ -1833,6 +1834,24 @@ f5: \ assert str(t2.sources[0]) == 'asrc6', map(str, t2.sources) assert str(t2.sources[1]) == 'asrc7', map(str, t2.sources) + tgt = env.Alias('add', 's1') + tgt = env.Alias('add', 's2')[0] + s = map(str, tgt.sources) + assert s == ['s1', 's2'], s + tgt = env.Alias(tgt, 's3')[0] + s = map(str, tgt.sources) + assert s == ['s1', 's2', 's3'], s + + tgt = env.Alias('act', None, "action1")[0] + s = str(tgt.builder.action) + assert s == "action1", s + tgt = env.Alias('act', None, "action2")[0] + s = str(tgt.builder.action) + assert s == "action1\naction2", s + tgt = env.Alias(tgt, None, "action3")[0] + s = str(tgt.builder.action) + assert s == "action1\naction2\naction3", s + def test_AlwaysBuild(self): """Test the AlwaysBuild() method""" env = Environment(FOO='fff', BAR='bbb') |
