Show
Ignore:
Timestamp:
12/04/06 12:45:28 (2 years ago)
Author:
madarche
Message:

- Moved test_ooo2dbk into the tests directory.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • OOo/ooo2dbk/trunk/tests/test_ooo2dbk

    r50377 r50416  
    2727import tempfile 
    2828 
    29 test_cases= [{'input_file': 'tests/input/test.sxw',  
    30               'expected_dir': 'tests/output/sxw.out'}, 
     29test_cases= [{'input_file': 'input/test.sxw', 
     30              'expected_dir': 'output/sxw.out'}, 
    3131 
    32              {'input_file': 'tests/input/test.odt', 
    33              'expected_dir': 'tests/output/odt.out'}, 
     32             {'input_file': 'input/test.odt', 
     33              'expected_dir': 'output/odt.out'}, 
    3434            ] 
    3535 
    3636def ooo2dbk_tester(input_file, expected_dir): 
    3737 
    38     target_dir = tempfile.mkdtemp(prefix = 'ooo2dbk-test-') 
     38    target_dir = tempfile.mkdtemp(prefix='ooo2dbk-test-') 
    3939 
    40     command = './ooo2dbk -d %s %s' % (os.path.join(target_dir,'test.docb.xml'), 
    41                                                    input_file) 
     40    command = '../ooo2dbk -d %s %s' % (os.path.join(target_dir,'test.docb.xml'), 
     41                                      input_file) 
    4242    print command 
    4343    os.system(command) 
     
    5050        image_to_find = os.path.join(expected_images_dir, image) 
    5151        if os.path.isfile(image_to_find): #to avoid .svn dir 
    52             expect = os.path.join(target_dir, 'images',image) 
     52            expect = os.path.join(target_dir, 'images', image) 
    5353            if not os.path.isfile(expect): 
    5454                status = status and False 
     
    6666        status = False 
    6767        print "docbook files are different !" 
    68         command = "diff %s %s" % (os.path.join(expected_dir, 'test.docb.xml'), 
    69                                   os.path.join(target_dir, 'test.docb.xml')) 
     68        command = ("diff -u %s %s" % 
     69                   (os.path.join(expected_dir, 'test.docb.xml'), 
     70                    os.path.join(target_dir, 'test.docb.xml') 
     71                    ) 
     72                   ) 
    7073        os.system(command) 
    7174