Skip to content

increase wildmatch test coverage

Ævar Arnfjörð Bjarmason git 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest10 patches 0 repliesNew
  2. v47 patches 17 repliesSuperseded
  3. v37 patches 1 replySuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v27 patches10 repliesSuperseded
v16 patches3 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10wildmatch test: indent with tabs, not spacest/t3070-wildmatch.sh+27 -270 replies
2/10wildmatch test: use more standard shell stylet/t3070-wildmatch.sh+6 -30 replies
3/10wildmatch test: don't try to vertically align our outputt/t3070-wildmatch.sh+5 -50 replies
4/10wildmatch test: use a paranoia pattern from nul_match()t/t3070-wildmatch.sh+12 -30 replies
5/10wildmatch test: remove dead fnmatch() test codet/t3070-wildmatch.sh+178 -1780 replies
6/10wildmatch test: use test_must_fail, not ! for test-wildmatcht/t3070-wildmatch.sh+3 -30 replies
7/10wildmatch test: perform all tests under all wildmatch() modest/helper/test-wildmatch.c t/t3070-wildmatch.sh+228 -2520 replies
8/10wildmatch test: create & test files on disk in addition to in-memoryt/t3070-wildmatch.sh+190 -110 replies
9/10test-lib: add an EXPENSIVE_ON_WINDOWS prerequisitet/test-lib.sh+4 -00 replies
10/10wildmatch test: mark test as EXPENSIVE_ON_WINDOWSt/t3070-wildmatch.sh+8 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 00/10] increase wildmatch test coverage

v5 has been a long time coming (20 days since I said I'd re-roll this), but hopefully this is a version that works well for everyone, including Windows users. Changes:

Ævar Arnfjörð Bjarmason (10):
wildmatch test: indent with tabs, not spaces wildmatch test: use more standard shell style wildmatch test: don't try to vertically align our output wildmatch test: use a paranoia pattern from nul_match() wildmatch test: remove dead fnmatch() test code

No changes.

wildmatch test: use test_must_fail, not ! for test-wildmatch

NEW: Fix a tiny nit I spotted while re-rolling.

wildmatch test: perform all tests under all wildmatch() modes

The testing of various wildmatch modes got factored into a function. It makes no difference to this patch, but makes a huge difference in readability to the follow-up patch.

Also I stopped renaming "match" to "wildtest", I can't remeber why I did that in the first place, but no point in doing that, and this makes things easier to review...

wildmatch test: create & test files on disk in addition to in-memory

Almost entirely based on feedback from Johannes:

a) This is now much more friendly under -x, as little test code as possible outside actual tests.

b) Factored out into functions

c) Gave variables better names

d) Hopefully runs under Windows now without errors, due to a blacklist of filenames that aren't allowed on Windows. Commit message now mentions this.

e) This should be a lot faster than before, since I factored out the setup work being done for every test so it's only done

f) At this point I can't remember who/where this was pointed out, but it was observed that I was using a very dangerous looking rm -rf -- * pattern in the old test, turns out this could be replaced with a less scary git clean -df.

test-lib: add an EXPENSIVE_ON_WINDOWS prerequisite wildmatch test: mark test as EXPENSIVE_ON_WINDOWS

Follow-up my [email protected] from the v4 thread, and create an EXPENSIVE_ON_WINDOWS prerequisite, which is then used for the file tests so they're skipped on Windows by default.

Even though 8/10 should be faster now, and hopefully passes on Windows, I still expect it to be quite slow on Windows, so let's not run it there by default unless under GIT_TEST_LONG=1.

 t/helper/test-wildmatch.c |   2 +
 t/t3070-wildmatch.sh      | 655 +++++++++++++++++++++++++++++-----------------
 t/test-lib.sh             |   4 +
 3 files changed, 416 insertions(+), 245 deletions(-)
Signature · 1 line
2.15.1.424.g9478a66081