test_bad_path_name_checks: allow Windows path sep

With this change if a path ends with '/' on Linux/macOS
and ends with either '/' or '\' on Windows, the test will pass.

Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com>
Change-Id: Id7d1b134f9c0bdf7ceaf149af304bbf90cbd7b21
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353180
Reviewed-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Daniel Kutik 2022-11-27 13:35:42 +01:00
parent 003684b6e5
commit 3593a10643

View File

@ -578,7 +578,7 @@ class ProjectElementTests(ManifestParseTestCase):
parse('', 'ok')
for path in INVALID_FS_PATHS:
if not path or path.endswith('/'):
if not path or path.endswith('/') or path.endswith(os.path.sep):
continue
with self.assertRaises(error.ManifestInvalidPathError):