Code

Merge git://github.com/git-l10n/git-po
[git.git] / t / t9501-gitweb-standalone-http-status.sh
index d196cc5ca93b07bcf20e4629455ea7f03b0907c7..31076edc5bd45261f5874b10dad6376e49fb9002 100755 (executable)
@@ -15,9 +15,10 @@ code and message.'
 # ----------------------------------------------------------------------
 # snapshot settings
 
-test_commit \
-       'SnapshotTests' \
-       'i can has snapshot?'
+test_expect_success 'setup' "
+       test_commit 'SnapshotTests' 'i can has snapshot'
+"
+
 
 cat >>gitweb_config.perl <<\EOF
 $feature{'snapshot'}{'override'} = 0;
@@ -125,7 +126,6 @@ test_expect_success 'load checking: load too high (default action)' '
        grep "Status: 503 Service Unavailable" gitweb.headers &&
        grep "503 - The load average on the server is too high" gitweb.body
 '
-test_debug 'cat gitweb.log' # just in case
 test_debug 'cat gitweb.headers'
 
 # turn off load checking
@@ -134,4 +134,14 @@ our $maxload = undef;
 EOF
 
 
+# ----------------------------------------------------------------------
+# invalid arguments
+
+test_expect_success 'invalid arguments: invalid regexp (in project search)' '
+       gitweb_run "a=project_list;s=*\.git;sr=1" &&
+       grep "Status: 400" gitweb.headers &&
+       grep "400 - Invalid.*regexp" gitweb.body
+'
+test_debug 'cat gitweb.headers'
+
 test_done