git p4: fix unit tests
[gitweb.git] / t / t9501-gitweb-standalone-http-status.sh
index 2487da1296da1a2508526f58a2e45fa750c49c8e..31076edc5bd45261f5874b10dad6376e49fb9002 100755 (executable)
@@ -16,7 +16,7 @@ code and message.'
 # snapshot settings
 
 test_expect_success 'setup' "
-       test_commit 'SnapshotTests' 'i can has snapshot?'
+       test_commit 'SnapshotTests' 'i can has snapshot'
 "
 
 
@@ -126,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
@@ -135,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