aboutsummaryrefslogtreecommitdiff
path: root/t/t9700
Commit message (Collapse)AuthorAge
* t/t9700/test.pl: don't access private object members, use public access methodsBrandon Casey2010-06-29
| | | | | | | | | | | | | | | | | | 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>
* t9700: Use Test::More->builder, not $Test::Builder::TestÆvar Arnfjörð Bjarmason2010-06-27
| | | | | | | | | | | | | | $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>
* test-lib: Make the test_external_* functions TAP-awareÆvar Arnfjörð Bjarmason2010-06-25
| | | | | | | | | | | | | | | 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>
* t9700-perl-git.sh: Fix a test failure on CygwinRamsay Jones2009-11-19
| | | | | | | | | | | | | | | 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>
* Git.pm: Always set Repository to absolute path if autodetectingFrank Lichtenheld2009-05-09
| | | | | | | | | 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>
* Git.pm: Set GIT_WORK_TREE if we set GIT_DIRFrank Lichtenheld2009-05-09
| | | | | | | | | | 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>
* Merge branch 'maint'Junio C Hamano2008-09-16
|\ | | | | | | | | | | | | | | * 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()
| * t9700/test.pl: remove File::Temp requirementBrandon Casey2008-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * t9700/test.pl: avoid bareword 'STDERR' in 3-argument open()Brandon Casey2008-09-15
| | | | | | | | | | | | | | | | | | | | 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>
* | t9700: remove useless checkJohannes Schindelin2008-08-08
|/ | | | | | | | | | | | 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>
* Git.pm: add test suiteLea Wiemann2008-06-19
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>