Wiki
Show
Ignore:
Timestamp:
02/28/10 21:24:48 (2 years ago)
Author:
Chuck.Esterbrook
Message:

Added -test-runner command line option to specify the method to invoke to run the unit tests.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Tests/700-command-line/104-cobra-test.cobra

    r1452 r2295  
    33class Test 
    44 
    5     def main is shared 
    6         Test().run 
    7  
    8     def run 
     5    def main 
    96        bar = '-------------------------------------------------------------------' 
    107 
    118        output = .runCobraExe('-test 106-cobra-test-program.cobra') 
    129        try 
     10            assert '** Alternate test runner' not in output 
    1311            assert '** Test' in output 
    1412            assert '** main shared' in output 
     
    2321        try 
    2422            assert '** Test' in output 
    25             assert '** run' in output 
     23            assert '** foo' in output 
    2624            assert '** Bar' in output 
    2725            assert '** baz' in output 
     26        finally 
     27            print bar 
     28            print output 
     29            print bar 
     30 
     31        output = .runCobraExe('-test-runner:Test.alternateTestRunner -test 106-cobra-test-program.cobra') 
     32        try 
     33            assert '** Alternate test runner' in output 
     34            assert '** Test' in output 
     35            assert '** main shared' in output 
     36            assert '** Bar' in output 
     37            assert '** baz' in output 
     38        finally 
     39            print bar 
     40            print output 
     41            print bar 
     42 
     43        output = .runCobraExe('-test-runner:nil 106-cobra-test-program.cobra') 
     44        try 
     45            assert '** Alternate test runner' not in output 
     46            assert '** Test' not in output 
     47            assert '** main shared' not in output 
     48            assert '** Bar' not in output 
     49            assert '** baz' not in output 
    2850        finally 
    2951            print bar