fix: testcase path handling error when path startswith "./" or ".\\"

This commit is contained in:
debugtalk
2020-06-15 18:32:33 +08:00
parent d25504e8ed
commit d4bdf61c9b
2 changed files with 8 additions and 0 deletions

View File

@@ -64,6 +64,13 @@ if __name__ == "__main__":
def __ensure_absolute(path: Text) -> Text:
if path.startswith("./"):
# Linux/Darwin, hrun ./test.yml
path = path[len("./"):]
elif path.startswith(".\\"):
# Windows, hrun .\\test.yml
path = path[len(".\\"):]
path = ensure_path_sep(path)
project_meta = load_project_meta(path)