summaryrefslogtreecommitdiffstats
path: root/test/SCCS
diff options
context:
space:
mode:
Diffstat (limited to 'test/SCCS')
-rw-r--r--test/SCCS/SCCSCOM.py3
-rw-r--r--test/SCCS/SCCSCOMSTR.py3
-rw-r--r--test/SCCS/diskcheck.py10
-rw-r--r--test/SCCS/explicit.py9
-rw-r--r--test/SCCS/implicit.py6
-rw-r--r--test/SCCS/transparent.py9
6 files changed, 14 insertions, 26 deletions
diff --git a/test/SCCS/SCCSCOM.py b/test/SCCS/SCCSCOM.py
index 771b773..9d1b649 100644
--- a/test/SCCS/SCCSCOM.py
+++ b/test/SCCS/SCCSCOM.py
@@ -58,10 +58,9 @@ for f in sys.argv[1:]:
test.write('SConstruct', """
def cat(env, source, target):
target = str(target[0])
- source = map(str, source)
f = open(target, "wb")
for src in source:
- f.write(open(src, "rb").read())
+ f.write(open(str(src), "rb").read())
f.close()
env = Environment(TOOLS = ['default', 'SCCS'],
BUILDERS={'Cat':Builder(action=cat)},
diff --git a/test/SCCS/SCCSCOMSTR.py b/test/SCCS/SCCSCOMSTR.py
index 162fe3c..d0da2e4 100644
--- a/test/SCCS/SCCSCOMSTR.py
+++ b/test/SCCS/SCCSCOMSTR.py
@@ -58,10 +58,9 @@ for f in sys.argv[1:]:
test.write('SConstruct', """
def cat(env, source, target):
target = str(target[0])
- source = map(str, source)
f = open(target, "wb")
for src in source:
- f.write(open(src, "rb").read())
+ f.write(open(str(src), "rb").read())
f.close()
env = Environment(TOOLS = ['default', 'SCCS'],
BUILDERS={'Cat':Builder(action=cat)},
diff --git a/test/SCCS/diskcheck.py b/test/SCCS/diskcheck.py
index 8d30d33..a8660bc 100644
--- a/test/SCCS/diskcheck.py
+++ b/test/SCCS/diskcheck.py
@@ -29,7 +29,6 @@ Test transparent checkouts from SCCS files in an SCCS subdirectory.
"""
import os.path
-import string
import TestSCons
@@ -74,10 +73,9 @@ test.write(['SConstruct'], """
DefaultEnvironment()['SCCSCOM'] = 'cd ${TARGET.dir} && $SCCS get ${TARGET.file}'
def cat(env, source, target):
target = str(target[0])
- source = map(str, source)
f = open(target, "wb")
for src in source:
- f.write(open(src, "rb").read())
+ f.write(open(str(src), "rb").read())
f.close()
SetOption('diskcheck', ['match', 'rcs'])
env = Environment(BUILDERS={'Cat':Builder(action=cat)},
@@ -94,7 +92,7 @@ test.write(['bbb.in'], "checked-out bbb.in\n")
test.write(['sub', 'eee.in'], "checked-out sub/eee.in\n")
sub_SConscript = os.path.join('sub', 'SConscript')
-SConstruct_file_line = test.python_file_line(test.workpath('SConstruct'), 17)[:-1]
+SConstruct_file_line = test.python_file_line(test.workpath('SConstruct'), 16)[:-1]
expect = """\
@@ -107,7 +105,7 @@ test.run(status=2, stderr=expect)
test.run(arguments = '--diskcheck=sccs', stderr = None)
-lines = string.split("""
+lines = """
sccs get SConscript
sccs get aaa.in
cat(["aaa.out"], ["aaa.in"])
@@ -121,7 +119,7 @@ cat(["sub/eee.out"], ["sub/eee.in"])
sccs get fff.in
cat(["sub/fff.out"], ["sub/fff.in"])
cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
-""", '\n')
+""".split('\n')
test.must_contain_all_lines(test.stdout(), lines)
diff --git a/test/SCCS/explicit.py b/test/SCCS/explicit.py
index f716dd0..252e901 100644
--- a/test/SCCS/explicit.py
+++ b/test/SCCS/explicit.py
@@ -28,8 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test explicit checkouts from local SCCS files.
"""
-import string
-
import TestSCons
test = TestSCons.TestSCons()
@@ -71,10 +69,9 @@ for f in ['ddd.in', 'eee.in', 'fff.in']:
test.write('SConstruct', """
def cat(env, source, target):
target = str(target[0])
- source = map(str, source)
f = open(target, "wb")
for src in source:
- f.write(open(src, "rb").read())
+ f.write(open(str(src), "rb").read())
f.close()
env = Environment(BUILDERS={'Cat':Builder(action=cat)},
SCCSCOM = 'cd ${TARGET.dir} && $SCCS get $SCCSGETFLAGS ${TARGET.file}',
@@ -93,7 +90,7 @@ test.write(['sub', 'eee.in'], "checked-out sub/eee.in\n")
test.run(arguments = '.', stderr = None)
-lines = string.split("""
+lines = """
sccs get -e SConscript
sccs get -e aaa.in
cat(["aaa.out"], ["aaa.in"])
@@ -107,7 +104,7 @@ cat(["sub/eee.out"], ["sub/eee.in"])
sccs get -e fff.in
cat(["sub/fff.out"], ["sub/fff.in"])
cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
-""", '\n')
+""".split('\n')
test.must_contain_all_lines(test.stdout(), lines)
diff --git a/test/SCCS/implicit.py b/test/SCCS/implicit.py
index 79eaf06..3f86841 100644
--- a/test/SCCS/implicit.py
+++ b/test/SCCS/implicit.py
@@ -28,8 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test transparent SCCS checkouts of implicit dependencies.
"""
-import string
-
import TestSCons
test = TestSCons.TestSCons()
@@ -70,10 +68,10 @@ env.Program('foo.c')
test.run(stderr = None)
-lines = string.split("""
+lines = """
sccs get foo.c
sccs get foo.h
-""", '\n')
+""".split('\n')
test.must_contain_all_lines(test.stdout(), lines)
diff --git a/test/SCCS/transparent.py b/test/SCCS/transparent.py
index adc0fe1..a8105a2 100644
--- a/test/SCCS/transparent.py
+++ b/test/SCCS/transparent.py
@@ -28,8 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test transparent checkouts from SCCS files in an SCCS subdirectory.
"""
-import string
-
import TestSCons
test = TestSCons.TestSCons()
@@ -73,10 +71,9 @@ test.write(['SConstruct'], """
DefaultEnvironment()['SCCSCOM'] = 'cd ${TARGET.dir} && $SCCS get ${TARGET.file}'
def cat(env, source, target):
target = str(target[0])
- source = map(str, source)
f = open(target, "wb")
for src in source:
- f.write(open(src, "rb").read())
+ f.write(open(str(src), "rb").read())
f.close()
env = Environment(BUILDERS={'Cat':Builder(action=cat)},
SCCSFLAGS='-k')
@@ -93,7 +90,7 @@ test.write(['sub', 'eee.in'], "checked-out sub/eee.in\n")
test.run(arguments = '.', stderr = None)
-lines = string.split("""
+lines = """
sccs get SConscript
sccs get aaa.in
cat(["aaa.out"], ["aaa.in"])
@@ -107,7 +104,7 @@ cat(["sub/eee.out"], ["sub/eee.in"])
sccs get fff.in
cat(["sub/fff.out"], ["sub/fff.in"])
cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
-""", '\n')
+""".split('\n')
test.must_contain_all_lines(test.stdout(), lines)