Jonathan Nieder <jrnieder@xxxxxxxxx> writes: > Johannes Sixt wrote: >> Am 8/12/2010 1:35, schrieb Junio C Hamano: > >>> * jn/apply-filename-with-sp (2010-07-23) 4 commits >>> - apply: Handle traditional patches with space in filename >>> - t4135 (apply): use expand instead of pr for portability >>> - tests: Test how well "git apply" copes with weird filenames >>> - apply: Split quoted filename handling into new function >>> >>> Looked Ok. Will merge to 'next'. >> >> The test cases that work with files with tabs must have a prerequisite; >> see t3600-rm.sh. > > Would this work? > > -- 8< -- > Subject: t4135 (apply): filenames with tabs are not usable on NTFS > > Move the code setting up the FUNNYNAMES prerequisite from > v1.3.0-rc1~67 (workaround fat/ntfs deficiences for t3600-rm.sh, > 2006-03-03) to test-lib and use it. Hmm. FUNNYNAMES is used by only these two but we have nearly 500 individual test scripts in the test suite, and that was the original reason why we don't have it in test-lib.sh. I wonder if we can/should lazily check this kind of thing upon the first use of symbol during a single test session? * Create an empty $TEST_DIRECTORY/test-prereq file part of pre-clean target of t/Makefile. This file needs to be removed as part of clean target; * t/test-lib.sh "."-sources the test-prereq file before doing anything else; * Instead of using "satisfied" variable as a SP separated list of prerequisite tokens, use PREREQ_FOO shell variable (whose value can be true, false) to represent FOO prerequisite we have already checked; * When checking for prerequite FOO, test_have_prereq checks if PREREQ_FOO variable is set. If not, then it calls a shell function of the same name (i.e. PREREQ_FOO) defined in test-lib.sh (the function can exit with zero or non-zero just like usual tests to signal if the prerequisite is met), sets PREREQ_FOO to an appropriate value, and then runs "echo PREREQ_FOO=$PREREQ_FOO >>$TEST_DIRECTORY/test-prereq". Then $PREREQ_FOO can be examined to see if prerequisite FOO is satisfied. The file based caching of the above wouldn't work well under "make -j"; without it, we can still have a prerequisite checked only once per a test script run, which is not worse than the current situation (and it would even save cycles if a test does not check for a particular prereq, e.g. SYMLINKS, that is always checked in test-lib). -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html