summaryrefslogtreecommitdiffstats
path: root/test/Scanner
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2008-12-12 06:16:31 (GMT)
committerSteven Knight <knight@baldmt.com>2008-12-12 06:16:31 (GMT)
commit6554d8631debd788d6bad226d098daee080ca20e (patch)
treef468f63915d4ba1b0ea3cc2d064d5ce922cfe6e4 /test/Scanner
parent8e1e691178fb24207d0e073a8c67bd8810211396 (diff)
downloadSCons-6554d8631debd788d6bad226d098daee080ca20e.zip
SCons-6554d8631debd788d6bad226d098daee080ca20e.tar.gz
SCons-6554d8631debd788d6bad226d098daee080ca20e.tar.bz2
Issue 2255: Handle scanning of UTF-8 and UTF-16 files. (Greg Spencer)
Diffstat (limited to 'test/Scanner')
-rw-r--r--test/Scanner/FindPathDirs.py2
-rw-r--r--test/Scanner/Scanner.py4
-rw-r--r--test/Scanner/dictionary.py6
-rw-r--r--test/Scanner/exception.py2
-rw-r--r--test/Scanner/multi-env.py4
-rw-r--r--test/Scanner/source_scanner-dict.py6
6 files changed, 12 insertions, 12 deletions
diff --git a/test/Scanner/FindPathDirs.py b/test/Scanner/FindPathDirs.py
index 901d757..bb8f929 100644
--- a/test/Scanner/FindPathDirs.py
+++ b/test/Scanner/FindPathDirs.py
@@ -79,7 +79,7 @@ import re
include_re = re.compile(r'^include\s+(\S+)$', re.M)
def kfile_scan(node, env, path, arg):
- contents = node.get_contents()
+ contents = node.get_text_contents()
includes = include_re.findall(contents)
if includes == []:
return []
diff --git a/test/Scanner/Scanner.py b/test/Scanner/Scanner.py
index 16f3d19..80eab03 100644
--- a/test/Scanner/Scanner.py
+++ b/test/Scanner/Scanner.py
@@ -65,7 +65,7 @@ import re
include_re = re.compile(r'^include\s+(\S+)$', re.M)
def kfile_scan(node, env, scanpaths, arg):
- contents = node.get_contents()
+ contents = node.get_text_contents()
includes = include_re.findall(contents)
return includes
@@ -117,7 +117,7 @@ import string
def blork(env, target, source):
open(str(target[0]), 'wb').write(
- string.replace(source[0].get_contents(), 'getfile', 'MISSEDME'))
+ string.replace(source[0].get_text_contents(), 'getfile', 'MISSEDME'))
kbld = Builder(action=r'%(_python_)s build.py $SOURCES $TARGET',
src_suffix='.lork',
diff --git a/test/Scanner/dictionary.py b/test/Scanner/dictionary.py
index 62fda9b..b3baaa3 100644
--- a/test/Scanner/dictionary.py
+++ b/test/Scanner/dictionary.py
@@ -69,17 +69,17 @@ include2_re = re.compile(r'^include2\s+(\S+)$', re.M)
include3_re = re.compile(r'^include3\s+(\S+)$', re.M)
def kfile_scan1(node, env, scanpaths, arg=None):
- contents = node.get_contents()
+ contents = node.get_text_contents()
includes = include1_re.findall(contents)
return includes
def kfile_scan2(node, env, scanpaths, arg=None):
- contents = node.get_contents()
+ contents = node.get_text_contents()
includes = include2_re.findall(contents)
return includes
def kfile_scan3(node, env, scanpaths, arg=None):
- contents = node.get_contents()
+ contents = node.get_text_contents()
includes = include3_re.findall(contents)
return includes
diff --git a/test/Scanner/exception.py b/test/Scanner/exception.py
index 5d10fd7..31e571d 100644
--- a/test/Scanner/exception.py
+++ b/test/Scanner/exception.py
@@ -46,7 +46,7 @@ include_re = re.compile(r'^include\s+(\S+)$', re.M)
exception_re = re.compile(r'^exception\s+(.+)$', re.M)
def kfile_scan(node, env, target, arg):
- contents = node.get_contents()
+ contents = node.get_text_contents()
exceptions = exception_re.findall(contents)
if exceptions:
raise Exception, "kfile_scan error: %s" % exceptions[0]
diff --git a/test/Scanner/multi-env.py b/test/Scanner/multi-env.py
index 514fbca..c64f970 100644
--- a/test/Scanner/multi-env.py
+++ b/test/Scanner/multi-env.py
@@ -44,12 +44,12 @@ include_re = re.compile(r'^include\s+(\S+)$', re.M)
input_re = re.compile(r'^input\s+(\S+)$', re.M)
scan1 = Scanner(name = 'Include',
- function = lambda N,E,P,A: A.findall(N.get_contents()),
+ function = lambda N,E,P,A: A.findall(N.get_text_contents()),
argument = include_re,
skeys = ['.inp'])
scan2 = Scanner(name = 'Input',
- function = lambda N,E,P,A: A.findall(N.get_contents()),
+ function = lambda N,E,P,A: A.findall(N.get_text_contents()),
argument = input_re,
skeys = ['.inp'])
diff --git a/test/Scanner/source_scanner-dict.py b/test/Scanner/source_scanner-dict.py
index 1ac15a8..5c0a89f 100644
--- a/test/Scanner/source_scanner-dict.py
+++ b/test/Scanner/source_scanner-dict.py
@@ -73,17 +73,17 @@ include2_re = re.compile(r'^include2\s+(\S+)$', re.M)
include3_re = re.compile(r'^include3\s+(\S+)$', re.M)
def k1_scan(node, env, scanpaths, arg=None):
- contents = node.get_contents()
+ contents = node.get_text_contents()
includes = include1_re.findall(contents)
return includes
def k2_scan(node, env, scanpaths, arg=None):
- contents = node.get_contents()
+ contents = node.get_text_contents()
includes = include2_re.findall(contents)
return includes
def k3_scan(node, env, scanpaths, arg=None):
- contents = node.get_contents()
+ contents = node.get_text_contents()
includes = include3_re.findall(contents)
return includes