Guard against non-existent spell/fortune/wtf commands.

This commit is contained in:
Jeremy Fincher 2004-01-01 19:49:52 +00:00
parent 7cf27435bb
commit d5ed1e772c

View File

@ -32,10 +32,13 @@
from testsupport import * from testsupport import *
import os import os
import utils
if os.name == 'posix': if os.name == 'posix':
class UnixTestCase(PluginTestCase, PluginDocumentation): class UnixTestCase(PluginTestCase, PluginDocumentation):
plugins = ('Unix',) plugins = ('Unix',)
if utils.findBinaryInPath('aspell') is not None or \
utils.findBinaryInPath('ispell') is not None:
def testSpell(self): def testSpell(self):
self.assertRegexp('spell Strike', 'correctly') self.assertRegexp('spell Strike', 'correctly')
self.assertRegexp('spell asdlkjsdalfkjasdflkasjdflskdfjlsd', self.assertRegexp('spell asdlkjsdalfkjasdflkasjdflskdfjlsd',
@ -58,6 +61,7 @@ if os.name == 'posix':
def testCrypt(self): def testCrypt(self):
self.assertNotError('crypt jemfinch') self.assertNotError('crypt jemfinch')
if utils.findBinaryInPath('fortune') is not None:
def testFortune(self): def testFortune(self):
self.assertNotError('fortune') self.assertNotError('fortune')