浏览代码

[tests] need to escape those slashes on windows

Rudy Ges 1 年之前
父节点
当前提交
cc3afeea92
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tests/misc/src/Main.hx

+ 1 - 1
tests/misc/src/Main.hx

@@ -174,7 +174,7 @@ class Main {
 	}
 
 	static function hideStdPositions(content:String):String {
-		var regex = new EReg(getStd() + '([a-z/\\\\]+\\.hx):[0-9]+:( characters? [0-9]+(-[0-9]+)( :)?)', 'i');
+		var regex = new EReg(StringTools.replace(getStd(), '\\', '(?:\\\\|/)') + '([a-z/\\\\]+\\.hx):[0-9]+:( characters? [0-9]+(-[0-9]+)( :)?)', 'i');
 
 		return content.split("\n")
 			.map(line -> regex.replace(line, "$1:???:"))