tests/test-hgweb-no-request-uri
changeset 6785 4879468fa28f
parent 5580 f429e0e067a8
child 6796 943f066c0d58
equal deleted inserted replaced
6784:18c429ea3a0e 6785:4879468fa28f
    42 }
    42 }
    43 
    43 
    44 output = StringIO()
    44 output = StringIO()
    45 env['PATH_INFO'] = '/'
    45 env['PATH_INFO'] = '/'
    46 env['QUERY_STRING'] = 'style=atom'
    46 env['QUERY_STRING'] = 'style=atom'
    47 hgweb('.', name = 'repo')(env, startrsp)
    47 content = hgweb('.', name = 'repo')(env, startrsp)
    48 print output.getvalue()
    48 sys.stdout.write(output.getvalue())
       
    49 sys.stdout.write(''.join(content))
    49 print '---- ERRORS'
    50 print '---- ERRORS'
    50 print errors.getvalue()
    51 print errors.getvalue()
    51 
    52 
    52 output = StringIO()
    53 output = StringIO()
    53 env['PATH_INFO'] = '/file/tip/'
    54 env['PATH_INFO'] = '/file/tip/'
    54 env['QUERY_STRING'] = 'style=raw'
    55 env['QUERY_STRING'] = 'style=raw'
    55 hgweb('.', name = 'repo')(env, startrsp)
    56 content = hgweb('.', name = 'repo')(env, startrsp)
    56 print output.getvalue()
    57 sys.stdout.write(output.getvalue())
       
    58 sys.stdout.write(''.join(content))
    57 print '---- ERRORS'
    59 print '---- ERRORS'
    58 print errors.getvalue()
    60 print errors.getvalue()
    59 
    61 
    60 output = StringIO()
    62 output = StringIO()
    61 env['PATH_INFO'] = '/'
    63 env['PATH_INFO'] = '/'
    62 env['QUERY_STRING'] = 'style=raw'
    64 env['QUERY_STRING'] = 'style=raw'
    63 hgwebdir({'repo': '.'})(env, startrsp)
    65 content = hgwebdir({'repo': '.'})(env, startrsp)
    64 print output.getvalue()
    66 sys.stdout.write(output.getvalue())
       
    67 sys.stdout.write(''.join(content))
    65 print '---- ERRORS'
    68 print '---- ERRORS'
    66 print errors.getvalue()
    69 print errors.getvalue()
    67 
    70 
    68 output = StringIO()
    71 output = StringIO()
    69 env['PATH_INFO'] = '/repo/file/tip/'
    72 env['PATH_INFO'] = '/repo/file/tip/'
    70 env['QUERY_STRING'] = 'style=raw'
    73 env['QUERY_STRING'] = 'style=raw'
    71 hgwebdir({'repo': '.'})(env, startrsp)
    74 content = hgwebdir({'repo': '.'})(env, startrsp)
    72 print output.getvalue()
    75 sys.stdout.write(output.getvalue())
       
    76 sys.stdout.write(''.join(content))
    73 print '---- ERRORS'
    77 print '---- ERRORS'
    74 print errors.getvalue()
    78 print errors.getvalue()
    75 EOF
    79 EOF
    76 
    80 
    77 python request.py | sed "s/http:\/\/127\.0\.0\.1:[0-9]*\//http:\/\/127.0.0.1\//"
    81 python request.py | sed "s/http:\/\/127\.0\.0\.1:[0-9]*\//http:\/\/127.0.0.1\//"