diff options
author | Dirk Baechle <dl9obn@darc.de> | 2014-08-24 10:04:48 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2014-08-24 10:04:48 (GMT) |
commit | 1930f1b34740e1b12220c46483d3fb5f9e125aef (patch) | |
tree | b6d4f20ff4de7b7c463d17799411cc81bec5b21e | |
parent | 78a8b1cdcfa5d0fb290cf4569e5b18a4d04c73cf (diff) | |
download | SCons-1930f1b34740e1b12220c46483d3fb5f9e125aef.zip SCons-1930f1b34740e1b12220c46483d3fb5f9e125aef.tar.gz SCons-1930f1b34740e1b12220c46483d3fb5f9e125aef.tar.bz2 |
- updated doc string and simplified a comparison, based on PR review comments
-rw-r--r-- | src/engine/SCons/Platform/PlatformTests.py | 11 | ||||
-rw-r--r-- | src/engine/SCons/Platform/__init__.py | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/engine/SCons/Platform/PlatformTests.py b/src/engine/SCons/Platform/PlatformTests.py index a507e4e..ca3080e 100644 --- a/src/engine/SCons/Platform/PlatformTests.py +++ b/src/engine/SCons/Platform/PlatformTests.py @@ -26,7 +26,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import SCons.compat import collections -import sys import unittest import TestUnit @@ -121,12 +120,10 @@ class PlatformTestCase(unittest.TestCase): assert env != {}, env class TempFileMungeTestCase(unittest.TestCase): - def test_TempFileMunge(self): - """Test the TempFileMunge() class, more specifically the - MAXLINELENGTH setting. - We try setting different maximum line lengths for a - fixed command string and ensure that the tempfile mechanism - kicks in at MAXLINELENGTH+1. + def test_MAXLINELENGTH(self): + """ Test different values for MAXLINELENGTH with the same + size command string to ensure that the temp file mechanism + kicks in only at MAXLINELENGTH+1, or higher """ # Init class with cmd, such that the fully expanded # string reads "a test command line". diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py index a9c8076..fa6df61 100644 --- a/src/engine/SCons/Platform/__init__.py +++ b/src/engine/SCons/Platform/__init__.py @@ -188,7 +188,7 @@ class TempFileMunge(object): (fd, tmp) = tempfile.mkstemp('.lnk', text=True) native_tmp = SCons.Util.get_native_path(os.path.normpath(tmp)) - if env.get('SHELL',None) and env['SHELL'] == 'sh': + if env.get('SHELL',None) == 'sh': # The sh shell will try to escape the backslashes in the # path, so unescape them. native_tmp = native_tmp.replace('\\', r'\\\\') |