mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
tests: use cgienv to minimize environment setup at hgweb tests
This patch follows other hgweb tests.
This commit is contained in:
parent
0ba20c74eb
commit
336bd254bb
@ -116,9 +116,9 @@ Check hgweb's load order of extensions and registration of functions
|
||||
> application = hgweb('.', 'test repo')
|
||||
> wsgicgi.launch(application)
|
||||
> EOF
|
||||
$ . "$TESTDIR/cgienv"
|
||||
|
||||
$ REQUEST_METHOD='GET' PATH_INFO='/' SCRIPT_NAME='' QUERY_STRING='' \
|
||||
> SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \
|
||||
$ PATH_INFO='/' SCRIPT_NAME='' python hgweb.cgi \
|
||||
> | grep '^[0-9]) ' # ignores HTML output
|
||||
1) foo imported
|
||||
1) bar imported
|
||||
@ -137,9 +137,7 @@ Check hgweb's load order of extensions and registration of functions
|
||||
$ PATH_INFO='/shortlog'
|
||||
#endif
|
||||
$ export PATH_INFO
|
||||
$ REQUEST_METHOD='GET' SCRIPT_NAME='' \
|
||||
> QUERY_STRING='rev=foo() and bar()' \
|
||||
> SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \
|
||||
$ SCRIPT_NAME='' QUERY_STRING='rev=foo() and bar()' python hgweb.cgi \
|
||||
> | grep '<a href="/rev/[0-9a-z]*">'
|
||||
<a href="/rev/c24b9ac61126">add file</a>
|
||||
|
||||
|
@ -222,13 +222,9 @@ Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail)
|
||||
> application = hgweb('.', 'test repo')
|
||||
> wsgicgi.launch(application)
|
||||
> EOF
|
||||
$ . "$TESTDIR/cgienv"
|
||||
|
||||
$ PATH_INFO='/' \
|
||||
> QUERY_STRING='' \
|
||||
> REQUEST_METHOD='GET' \
|
||||
> SCRIPT_NAME='' \
|
||||
> SERVER_NAME='localhost' \
|
||||
> SERVER_PORT='80' \
|
||||
$ SCRIPT_NAME='' \
|
||||
> python "$TESTTMP/hgweb.cgi" > /dev/null
|
||||
|
||||
Test archiving the various revisions. These hit corner cases known with
|
||||
|
Loading…
Reference in New Issue
Block a user