summaryrefslogtreecommitdiff
path: root/src/engine/SCons/SConfTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/SConfTests.py')
-rw-r--r--src/engine/SCons/SConfTests.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/engine/SCons/SConfTests.py b/src/engine/SCons/SConfTests.py
index bb07952..1831b0d 100644
--- a/src/engine/SCons/SConfTests.py
+++ b/src/engine/SCons/SConfTests.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/SConfTests.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+__revision__ = "src/engine/SCons/SConfTests.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
import SCons.compat
@@ -611,6 +611,30 @@ int main() {
finally:
sconf.Finish()
+ def test_CheckProg(self):
+ """Test SConf.CheckProg()
+ """
+ self._resetSConfState()
+ sconf = self.SConf.SConf(self.scons_env,
+ conf_dir=self.test.workpath('config.tests'),
+ log_file=self.test.workpath('config.log'))
+
+ try:
+ if os.name != 'nt':
+ r = sconf.CheckProg('sh')
+ assert r, "/bin/sh"
+ else:
+ r = sconf.CheckProg('cmd.exe')
+ self.assertIn('cmd.exe',r)
+
+
+ r = sconf.CheckProg('hopefully-not-a-program')
+ assert r is None
+
+ finally:
+ sconf.Finish()
+
+
def test_Define(self):
"""Test SConf.Define()
"""