aboutsummaryrefslogtreecommitdiff
path: root/t/t9500-gitweb-standalone-no-errors.sh
Commit message (Collapse)AuthorAge
* Fix tests breaking when checkout path contains shell metacharactersBryan Donlan2008-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the remainder of the issues where the test script itself is at fault for failing when the git checkout path contains whitespace or other shell metacharacters. The majority of git svn tests used the idiom test_expect_success "title" "test script using $svnrepo" These were changed to have the test script in single-quotes: test_expect_success "title" 'test script using "$svnrepo"' which unfortunately makes the patch appear larger than it really is. One consequence of this change is that in the verbose test output the value of $svnrepo (and in some cases other variables, too) is no longer expanded, i.e. previously we saw * expecting success: test script using /path/to/git/t/trash/svnrepo but now it is: * expecting success: test script using "$svnrepo" Signed-off-by: Bryan Donlan <bdonlan@fushizen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Don't use the 'export NAME=value' in the test scripts.Bryan Donlan2008-05-05
| | | | | | | | | | | | | | This form is not portable across all shells, so replace instances of: export FOO=bar with: FOO=bar export FOO Signed-off-by: Bryan Donlan <bdonlan@fushizen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb: Fix 'history' view for deleted files with historyJakub Narebski2008-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When asked for history of a file which is not present in given branch ("HEAD", i.e. current branch, or given by transient $hash_hase ('hb') parameter), but is present deeper in the history (meaning that "git rev-list --full-history $hash_base -- $file_name" is not empty), and there is no $hash ('h') parameter set for a file, gitweb would spew multiple of "Use of uninitialized value" warnings, and some links would be missing. This commit fixes this bug. This bug occurs in the rare cases when "git log -- <path>" is empty and "git log --full-history -- <path>" is not, or to be more exact in the cases when full-history starts later than given branch. It can happen if you are using handcrafted gitwb URL, or if you follow generic 'history' link or bookmark for a file which got deleted. Gitweb tried to get file type ('tree', or 'blob', or even 'commit') from the commit we start searching from (where the file was not present), and not among found commits. This was the cause of "Use of uninitialized value" warnings. This commit also add tests for such situation to t9500 test. While we are it, return HTTP error if there is _no_ history; it means that file or directory was not found (for given branch). Also error out if type of item could not be found: it should not happen now, but better be sure. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb: Make config_to_multi return [] instead of [undef]Petr Baudis2007-12-16
| | | | | | | | | | | | | | | This is important for the list of clone urls, where if there are no per-repository clone URL configured, the default base URLs are never used for URL construction without this patch. Add tests for different ways of setting project URLs, just in case. Note that those tests in current form wouldn't detect breakage fixed by this patch, as it only checks for errors and not for expected output. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb: Add tests for overriding gitweb config with repo configJakub Narebski2007-11-02
| | | | | | | | | | | | Make blame view and snapshot support overridable by repository config. Test tree view with both features disabled, and with both features enabled. Test with features enabled also tests multiple formats snapshot support (in tree view). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb: Remove CGI::Carp::set_programname() call from t9500 gitweb testJakub Narebski2007-11-02
| | | | | | | | It does appear to do nothing; gitweb is run as standalone program and not as CGI script in this test. This call caused problems later. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb: speed up project listing on large work trees by limiting find depthLuke Lu2007-10-17
| | | | | Signed-off-by: Luke Lu <git@vicaya.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Fix a test failure (t9500-*.sh) on cygwinRamsay Jones2007-09-11
| | | | | | | | | | | | | | On filesystems where it is appropriate to set core.filemode to false, test 29 ("commitdiff(0): mode change") fails when git-commit does not notice a file (execute) permission change. A fix requires noting the new file execute permission in the index with a "git update-index --chmod=+x", prior to the commit. Add a function (note_chmod) which implements this idea, and insert a call in each test that modifies the x permission. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb: Simplify 'opt' parameter validation, add "no merges" feedsJakub Narebski2007-07-28
| | | | | | | | | | | | | | | | | Simplify and make more readable validation of 'opt' (extra options) parameter, using exists($hash{key}) instead of grepping keys of a hash for value. Move 'opt' parameter to be the last (for now) in the URL. Make use of '--no-merges' extra option ('opt') by adding "no merges" RSS and Atom feeds to the HTML header. Note that alternate format links in the RSS and Atom views do not use '--no-merges' option yet! Adds tests for the 'opt' parameter to t9500-gitweb-standalone-no-errors.sh Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9500: skip gitweb tests if perl version is too oldSven Verdoolaege2007-06-24
| | | | | | | | | | gitweb calls Encode::decode_utf8 with two arguments, but old versions of perl only allow this function to be called with one argument. Even older versions of perl do not even have an Encode module. Signed-off-by: Sven Verdoolaege <skimo@kotnet.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb: Handle non UTF-8 text betterMartin Koegler2007-06-03
| | | | | | | | | | | | | | | | gitweb assumes that everything is in UTF-8. If a text contains invalid UTF-8 character sequences, the text must be in a different encoding. This commit introduces $fallback_encoding which would be used as input encoding if gitweb encounters text with is not valid UTF-8. Add basic test for this in t/t9500-gitweb-standalone-no-errors.sh Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Tested-by: Alexandre Julliard <julliard@winehq.org> Tested-by: Ismail Dönmez <ismail@pardus.org.tr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb: Add test t9500 for gitweb (as standalone script)Jakub Narebski2007-05-20
This test runs gitweb (git web interface) as CGI script from commandline, and checks that it would not write any errors or warnings to log. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>