summaryrefslogtreecommitdiff
path: root/t/t9700
AgeCommit message (Collapse)AuthorFilesLines
2010-06-29t/t9700/test.pl: don't access private object members, use public access methodsLibravatar Brandon Casey1-3/+3
This test is accessing private object members of the Test::More and Test::Builder objects. Older versions of Test::More did not implement these variables using a hash. My system complains as follows: Can't coerce array into hash at <snip>/t/t9700/test.pl line 13. BEGIN failed--compilation aborted at <snip>/t/t9700/test.pl line 15. There are public access methods available for retrieving and setting these variables, so let's use them instead. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27t9700: Use Test::More->builder, not $Test::Builder::TestLibravatar Ævar Arnfjörð Bjarmason1-4/+5
$Test::Builder::Test was only made into an `our' variable in 0.94 released in September 2009, older distros are more likely to have 0.92 or earlier. Use the singleton Test::More->builder constructor instead. The exit() call was also unportable to <0.94. Just output a meaningful exit code if the ->is_passing method exists. The t9700-perl-git.sh test only cares about stderr output, so this doesn't affect test results when using older Test::More modules. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-25test-lib: Make the test_external_* functions TAP-awareLibravatar Ævar Arnfjörð Bjarmason1-0/+11
Before TAP we just ran the Perl test and assumed that it failed if nothing was printed on STDERR. Continue doing that, but introduce a `test_external_has_tap' variable which tests can set to indicate that they're outputting TAP. If it's set we won't output a test plan, but trust the external test to do so. That way we can make external tests work with a TAP harness, but still maintain compatibility with test-lib's own way of tracking tests through the test-results directory. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-19t9700-perl-git.sh: Fix a test failure on CygwinLibravatar Ramsay Jones1-1/+1
The t/t9700/test.pl script uses method invocation syntax when using the Cwd module to determine the current working directory. This fails on cygwin, since cygwin perl specifically checks for any arguments to the cwd() function and croak()'s with the message "Usage: Cwd::cwd()". (In perl v5.8.8 distribution, see the file perl-5.8.8/cygwin/cygwin.c lines 139-157) In order to avoid the problem, we replace the method invocation syntax with a simple function call. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-09Git.pm: Always set Repository to absolute path if autodetectingLibravatar Frank Lichtenheld1-8/+2
So far we only set it to absolute paths in some cases which lead to problems like wc_chdir not working. Signed-off-by: Frank Lichtenheld <flichtenheld@astaro.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-09Git.pm: Set GIT_WORK_TREE if we set GIT_DIRLibravatar Frank Lichtenheld1-0/+13
Otherwise git will use the current directory as work tree which will lead to unexpected results if we operate in sub directory of the work tree. Signed-off-by: Frank Lichtenheld <flichtenheld@astaro.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-16Merge branch 'maint'Libravatar Junio C Hamano1-11/+14
* maint: Cosmetical command name fix Start conforming code to "git subcmd" style part 3 t9700/test.pl: remove File::Temp requirement t9700/test.pl: avoid bareword 'STDERR' in 3-argument open()
2008-09-15t9700/test.pl: remove File::Temp requirementLibravatar Brandon Casey1-10/+13
The object oriented version of File::Temp is a rather new incarnation it seems. The File::Temp man page for v5.8.0 says "(NOT YET IMPLEMENTED)" in the 'Objects' section. Instead of creating a file with a unique name in the system TMPDIR, we can create our own temporary file with a static name and use that instead. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Tested-by: Tom G. Christensen <tgc@statsbiblioteket.dk> on RHEL 3, Perl 5.8.0 Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-15t9700/test.pl: avoid bareword 'STDERR' in 3-argument open()Libravatar Brandon Casey1-1/+1
Some versions of perl complain when 'STDERR' is used as the third argument in the 3-argument form of open(). Convert to the 2-argument form which is described for duping STDERR in my second edition camel book. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Tested-by: Tom G. Christensen <tgc@statsbiblioteket.dk> on RHEL 3, Perl 5.8.0 Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08t9700: remove useless checkLibravatar Johannes Schindelin1-3/+0
t9700 used to check if the basename of the current directory is 'trash directory', the expensive way. However, there is absolutely no good reason why this test should not run in, say 'life is good' or 'i love tests'. So remove the check altogether. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-19Git.pm: add test suiteLibravatar Lea Wiemann1-0/+100
Add a shell script (t/t9700-perl-git.sh) that sets up a git repository and a perl script (t/t9700/test.pl) that runs the actual tests. Signed-off-by: Lea Wiemann <LeWiemann@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>