Add new @ shortcut for HEAD
[gitweb.git] / t / t9500-gitweb-standalone-no-errors.sh
index 0f771c673d58009e2bcde45254d4b4e9fa68efb9..6783c14c1ad9af0f5aa3d16e13250e9a1a292b28 100755 (executable)
@@ -539,8 +539,7 @@ test_expect_success \
         test_when_finished "GIT_COMMITTER_NAME=\"C O Mitter\"" &&
         echo "ISO-8859-1" >> file &&
         git add file &&
-        git config i18n.commitencoding ISO-8859-1 &&
-        test_when_finished "git config --unset i18n.commitencoding" &&
+        test_config i18n.commitencoding ISO-8859-1 &&
         git commit -F "$TEST_DIRECTORY"/t3900/ISO8859-1.txt &&
         gitweb_run "p=.git;a=commit"'
 
@@ -637,6 +636,45 @@ test_expect_success \
        'config override: tree view, features enabled in repo config (2)' \
        'gitweb_run "p=.git;a=tree"'
 
+# ----------------------------------------------------------------------
+# searching
+
+cat >>gitweb_config.perl <<\EOF
+
+# enable search
+$feature{'search'}{'default'} = [1];
+$feature{'grep'}{'default'} = [1];
+$feature{'pickaxe'}{'default'} = [1];
+EOF
+
+test_expect_success \
+       'search: preparation' \
+       'echo "1st MATCH" >>file &&
+        echo "2nd MATCH" >>file &&
+        echo "MATCH" >>bar &&
+        git add file bar &&
+        git commit -m "Added MATCH word"'
+
+test_expect_success \
+       'search: commit author' \
+       'gitweb_run "p=.git;a=search;h=HEAD;st=author;s=A+U+Thor"'
+
+test_expect_success \
+       'search: commit message' \
+       'gitweb_run "p=.git;a=search;h=HEAD;st=commitr;s=MATCH"'
+
+test_expect_success \
+       'search: grep' \
+       'gitweb_run "p=.git;a=search;h=HEAD;st=grep;s=MATCH"'
+
+test_expect_success \
+       'search: pickaxe' \
+       'gitweb_run "p=.git;a=search;h=HEAD;st=pickaxe;s=MATCH"'
+
+test_expect_success \
+       'search: projects' \
+       'gitweb_run "a=project_list;s=.git"'
+
 # ----------------------------------------------------------------------
 # non-ASCII in README.html
 
@@ -739,4 +777,13 @@ test_expect_success \
        'echo "\$projects_list_group_categories = 1;" >>gitweb_config.perl &&
         gitweb_run'
 
+# ----------------------------------------------------------------------
+# unborn branches
+
+test_expect_success \
+       'unborn HEAD: "summary" page (with "heads" subview)' \
+       'git checkout orphan_branch || git checkout --orphan orphan_branch &&
+        test_when_finished "git checkout master" &&
+        gitweb_run "p=.git;a=summary"'
+
 test_done