summaryrefslogtreecommitdiff
path: root/t/t0070-fundamental.sh
AgeCommit message (Collapse)Author
2018-06-28Merge branch 'jc/clean-after-sanity-tests'Junio C Hamano
test cleanup. * jc/clean-after-sanity-tests: tests: clean after SANITY tests
2018-06-15tests: clean after SANITY testsJunio C Hamano
Some of our tests try to make sure Git behaves sensibly in a read-only directory, by dropping 'w' permission bit before doing a test and then restoring it after it is done. The latter is needed for the test framework to clean after itself without leaving a leftover directory that cannot be removed. Ancient parts of tests however arrange the above with chmod a-w . && ... do the test ... status=$? chmod 775 . (exit $status) which obviously would not work if the test somehow dies before it has the chance to do "chmod 775". Rewrite them by following a more robust pattern recently written tests use, which is test_when_finished "chmod 775 ." && chmod a-w . && ... do the test ... Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-27t/helper: merge test-regex into test-toolNguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-27t/helper: merge test-mktemp into test-toolNguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-27t/helper: merge test-ctype into test-toolNguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-27test-regex: isolate the bug test codeNguyễn Thái Ngọc Duy
This is in preparation to turn test-regex into some generic regex testing command. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Helped-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04Merge branch 'tr/fd-gotcha-fixes'Junio C Hamano
Finishing touches to an earlier fix already in 'master'. * tr/fd-gotcha-fixes: t0070: test that git_mkstemps correctly checks return value of open()
2013-08-06t0070: test that git_mkstemps correctly checks return value of open()Dale R. Worley
Signed-off-by: Dale R. Worley <worley@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-11t0070 "mktemp to unwritable directory" needs SANITYTorsten Bögershausen
Use the SANITY prerequisite when testing if a temp file can be created in a read only directory. Skip the test under CYGWIN, or skip it under Unix/Linux when it is run as root. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-03test-regex: Add a test to check for a bug in the regex routinesRamsay Jones
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-22Improve error messages when temporary file creation failsArnout Engelen
Before, when creating a temporary file failed, a generic 'Unable to create temporary file' message was printed. In some cases this could lead to confusion as to which directory should be checked for correct permissions etc. This patch adds the template for the temporary filename to the error message, converting it to an absolute path if needed. A test verifies that the template is indeed printed when pointing to a nonexistent or unwritable directory. A copy of the original template is made in case mkstemp clears the template. Signed-off-by: Arnout Engelen <arnouten@bzzt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-18Add ctype testRené Scharfe
Manipulating the character class table in ctype.c by hand is error prone. To ensure that typos are found quickly, add a test program and script. test-ctype checks the output of the character class macros isspace() et. al. by applying them on all possible char values and consulting a list of all characters in the particular class. It doesn't check tolower() and toupper(); this could be added later. The test script t0070-fundamental.sh is created because there is no good place for the ctype test, yet -- except for t0000-basic.sh perhaps, but it doesn't run well on Windows, yet. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>