                                              '      \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' +

print = () -> console.log.apply @, [].slice.call(arguments)
eq = (a, b) ->
    as = a.toString()
    bs = b.toString()
    if as == bs then return else throw new Error "#{as} != #{bs}"

(() ->
    [setup, teardown, clear] = (() ->
        buffer = ''
        cl = console.log
        psw = process.stdout.write
        [() ->
            console.log = () ->
                buffer += ([].slice.call arguments).join() + '\n'
            process.stdout.write = () ->
                buffer += ([].slice.call arguments).join()
            null

        () ->
             console.log = cl
             process.stdout.write = psw
             null

        () ->
            stdout = buffer
            buffer = ''
            stdout]
    )()

    `with (this) //`
    tests =
        test_opt_parse: ->
            eq Option.parse('-h'), new Option('-h', null)
            eq Option.parse('-h'), new Option('-h', null)
