diff options
Diffstat (limited to 'Lib/dos_8x3/test_img.py')
-rw-r--r-- | Lib/dos_8x3/test_img.py | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/Lib/dos_8x3/test_img.py b/Lib/dos_8x3/test_img.py index 8a3b91e..576a51c 100644 --- a/Lib/dos_8x3/test_img.py +++ b/Lib/dos_8x3/test_img.py @@ -1,13 +1,18 @@ #! /usr/bin/env python + """Simple test script for imgfile.c Roger E. Masse """ -from test_support import verbose -import imgfile +from test_support import verbose, unlink + +import imgfile, uu, os - -def main(): + +def main(): + + uu.decode(findfile('testrgb.uue'), 'test.rgb') + uu.decode(findfile('greyrgb.uue'), 'greytest.rgb') # Test a 3 byte color image testimage('test.rgb') @@ -15,6 +20,16 @@ def main(): # Test a 1 byte greyscale image testimage('greytest.rgb') + unlink('test.rgb') + unlink('greytest.rgb') + +def findfile(file): + if os.path.isabs(file): return file + import sys + for dn in sys.path: + fn = os.path.join(dn, file) + if os.path.exists(fn): return fn + return file def testimage(name): """Run through the imgfile's battery of possible methods |