summaryrefslogtreecommitdiffstats
path: root/test/Deprecated/SourceCode/RCS/changed.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/Deprecated/SourceCode/RCS/changed.py')
-rw-r--r--test/Deprecated/SourceCode/RCS/changed.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/test/Deprecated/SourceCode/RCS/changed.py b/test/Deprecated/SourceCode/RCS/changed.py
index d451be0..14c80bd 100644
--- a/test/Deprecated/SourceCode/RCS/changed.py
+++ b/test/Deprecated/SourceCode/RCS/changed.py
@@ -20,7 +20,6 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
@@ -30,7 +29,17 @@ Test explicit checkouts from local RCS files.
import TestSCons
-test = TestSCons.TestSCons()
+test = TestSCons.TestSCons(match = TestSCons.match_re_dotall)
+
+test.write('SConscript', """
+Environment(tools = ['RCS']).RCS()
+""")
+
+msg_rcs = """The RCS() factory is deprecated and there is no replacement."""
+warn_rcs = test.deprecated_fatal('deprecated-build-dir', msg_rcs)
+msg_sc = """SourceCode() has been deprecated and there is no replacement.
+\tIf you need this function, please contact dev@scons.tigris.org."""
+warn_sc = test.deprecated_wrap(msg_sc)
rcs = test.where_is('rcs')
if not rcs:
@@ -45,7 +54,6 @@ if not co:
test.skip_test("Could not find `co' command, skipping test(s).\n")
-
main_cpp_contents = """\
#include <stdio.h>
#include <stdlib.h>
@@ -62,8 +70,8 @@ test.write('main.c', main_cpp_contents % 1)
test.run(program = ci, arguments = '-f -tmain.c main.c', stderr = None)
-
test.write('SConstruct', """
+SetOption('warn', 'deprecated-source-code')
import os
for key in ['LOGNAME', 'USERNAME', 'USER']:
logname = os.environ.get(key)
@@ -76,22 +84,20 @@ env2 = env.Clone()
env2.Program('main.exe', 'main.c')
""")
-test.run()
+test.run(stderr = warn_rcs + warn_sc)
test.run(program = test.workpath('main.exe'), stdout = "main.c 1\n")
-
-
test.run(program = co, arguments = '-l main.c', stderr = None)
+
test.write('main.c', main_cpp_contents % 2)
-test.not_up_to_date(arguments = 'main.exe')
+test.not_up_to_date(arguments = 'main.exe', stderr = warn_rcs + warn_sc)
test.run(program = test.workpath('main.exe'), stdout = "main.c 2\n")
-
test.pass_test()
# Local Variables: