summaryrefslogtreecommitdiff
path: root/t/t5560-http-backend-noserver.sh
AgeCommit message (Collapse)AuthorFilesLines
2013-07-18test-lib.sh - define and use GREP_STRIPS_CRLibravatar Mark Levedahl1-1/+1
Define a common macro for grep needing -U to allow tests to not need to inquire of specific platforms needing this option. Change t3032 and t5560 to use this rather than testing explicitly for mingw. This fixes these two tests on Cygwin. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-13t: use sane_unset instead of unsetLibravatar Ævar Arnfjörð Bjarmason1-3/+3
Change several tests to use the sane_unset function introduced in v1.7.3.1-35-g00648ba instead of the built-in unset function. This fixes a failure I was having on t9130-git-svn-authors-file.sh on Solaris, and prevents several other issues from occurring. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13Merge branch 'maint'Libravatar Junio C Hamano1-4/+4
* maint: Better advice on using topic branches for kernel development Documentation: update implicit "--no-index" behavior in "git diff" Documentation: expand 'git diff' SEE ALSO section Documentation: diff can compare blobs Documentation: gitrevisions is in section 7 shell portability: no "export VAR=VAL" CodingGuidelines: reword parameter expansion section Documentation: update-index: -z applies also to --index-info Documentation: No argument of ALLOC_GROW should have side-effects
2010-10-13shell portability: no "export VAR=VAL"Libravatar Junio C Hamano1-4/+4
It is more portable to say "VAR=VAL && export VAR" instead. Noticed by Ævar. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-03Side-step MSYS-specific path "corruption" leading to t5560 failure.Libravatar Eric Sunshine1-2/+1
Upon program invocation, MSYS converts environment variables containing path-like values from Unix-style to DOS-style under the assumption that the program being invoked understands only DOS-style pathnames. For instance, the Unix-style path /msysgit is translated to c:/msysgit. For test t5560, the path being requested from git-http-backend is specified via environment variable PATH_INFO as a URL path of the form /repo.git/foobar, which git-http-backend combines with GIT_PROJECT_ROOT to determine the actual physical path within the repository. This is a case where MSYS's conversion of the path-like value of PATH_INFO causes harm, for two reasons. First, the resulting converted path, when joined with GIT_PROJECT_ROOT is bogus (for instance, "C:/msysgit/git/t/trash-zzz/C:/msysgit/repo.git/HEAD"). Second, the converted PATH_INFO path is rejected by git-http-backend as an 'alias' due to validation failure on the part of daemon_avoid_alias(). Unfortunately, the standard work-around of doubling the leading slash (i.e. //repo.git/foobar) to suppress MSYS path conversion works only for command-line arguments, but not for environment variables. Consequently, side step the problem by instead passing git-http-backend an already-constructed full path rather than components GIT_PROJECT_ROOT and PATH_INFO. Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-10-01Do not strip CR when grepping HTTP headers.Libravatar Pat Thoyts1-0/+2
By default, MSYS grep reads in text-mode and converts CRLF into LF line endings. For testing HTTP use binary mode (-U) as checking is done for CR in HTTP headers Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-01-15Test t5560: Fix test when run with dashLibravatar Tarmigan Casebolt1-5/+10
A command invocation preceded by variable assignments, i.e. VAR1=VAL1 VAR2=VAL2 ... command args are implemented by dash and ksh in such a way not to export these variables, and keep the values after the command finishes, when the command is a shell function. POSIX.1 "2.9.5 Function Definition Command" specifies this behaviour. Many shells however treat this construct the same way as they are calling external commands. They export the variables during the duration of command, and resets their values after command returns. The test relied on the behaviour of the latter kind. Reported-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-06Smart-http tests: Test http-backend without curl or a webserverLibravatar Tarmigan Casebolt1-6/+22
This reuses many of the tests from the old t5560 but runs those tests without curl or a webserver. This will hopefully increase the testing coverage for http-backend because it does not require users to set GIT_TEST_HTTPD. Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-06Smart-http tests: Break test t5560-http-backend into piecesLibravatar Tarmigan Casebolt1-0/+52
This should introduce no functional change in the tests or the amount of test coverage. Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>