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
1 changed files with 17 additions and 13 deletions

View File

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