                                              '      \tprog (--help | -h)'
 
             usage = 'Usage:\n' +
-                    '  prog <a> <b> <c>\n' + 
+                    '  prog <a> <b> <c>\n' +
                     '  prog --version\n'   +
                     '  prog (--help | -h)\n\n'
             eq printable_usage(usage, 'rn'), 'Usage:\n' +

            eq printable_usage(usage, 'my_script'), 'Usage: my_script <a> <b> <c>'
            eq printable_usage(usage, null), 'Usage: prog <a> <b> <c>'

            usage = 'Usage:\tprog <a> <b> <c>\n' + 
                            'prog --version\n'   +
                            'prog (--help | -h)\n\n'
            eq printable_usage(usage, 'rn'), 'Usage:\trn <a> <b> <c>\n' +

            eq printable_usage(usage, null), 'usage: nospace'


    wr = console.log
    wr '================================================================'

    setup()

    number = 0
    passes = 0
    failures = 0
    results = []
    for test of tests
        continue if test[0..3] isnt 'test'
        try
            tests[test]()
            results.push ['.', test, 'OK', clear()]
        catch e
            results.push ['F', test, e.message, clear()]

    teardown()

    for result in results
        if result[0] == 'F'
            ++failures
            half = (56 - result[1].length)/2
            if half > 0
                [left, right] = [new Array(half + half%1).join('=') + ' ',
                           ' ' + new Array(half - half%1).join('=')]
            else
                [left, right] = ['', '']
            wr "#{left}In test #{result[1]}#{right}"
            wr "#{result[2]}"
            if result[3] isnt ''
                wr '------------------------ captured stdout -----------------------'
                wr result[3]
         else
             ++passes

    wr '================================================================'
    wr((result[0] for result in results).join(''))
    wr "#{passes} successes, #{failures} failures"
    wr '================================================================'
).call(require './docopt')
