Explorar o código

Add another test for empty path elements.

Jelmer Vernooij %!s(int64=7) %!d(string=hai) anos
pai
achega
17209b2c2c
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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'),
 ]