Browse Source

Add another test for empty path elements.

Jelmer Vernooij 7 years ago
parent
commit
17209b2c2c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      dulwich/tests/test_ignore.py

+ 2 - 0
dulwich/tests/test_ignore.py

@@ -56,6 +56,7 @@ POSITIVE_MATCH_TESTS = [
     (b"foo/bla/bar", b"foo/**/bar"),
     (b"foo/bar/", b"bar/"),
     (b"foo/bar/", b"bar"),
+    (b"foo/bar/", b"foo/bar/*"),
 ]
 
 NEGATIVE_MATCH_TESTS = [
@@ -78,6 +79,7 @@ TRANSLATE_TESTS = [
     (b"foo/**/blie.c", b'(?ms)foo(/.*)?\\/blie\\.c/?\\Z'),
     (b"**/bla.c", b'(?ms)(.*/)?bla\\.c/?\\Z'),
     (b"foo/**/bar", b'(?ms)foo(/.*)?\\/bar/?\\Z'),
+    (b"foo/bar/*", b'(?ms)foo\\/bar\\/[^/]*/?\\Z'),
 ]