Browse Source

Enable issue 7247 for cpp. Extra debug for EReg.toString

hughsando 6 năm trước cách đây
mục cha
commit
724129e621
2 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 2 0
      std/cpp/_std/EReg.hx
  2. 1 3
      tests/unit/src/unit/issues/Issue7247.hx

+ 2 - 0
std/cpp/_std/EReg.hx

@@ -178,6 +178,8 @@
 	}
 	static var escapeRegExpRe = ~/[\[\]{}()*+?.\\\^$|]/g;
 
+   function toString():String return 'EReg($r)';
+
    @:native("_hx_regexp_new_options")
 	extern static function _hx_regexp_new_options(s:String, options:String) : Dynamic;
 

+ 1 - 3
tests/unit/src/unit/issues/Issue7247.hx

@@ -12,9 +12,7 @@ class Issue7247 extends Test {
 		eq(str.indexOf("\\"),-1);
 		eq(str.lastIndexOf("\\"),-1);
 		eq(str.split("\\").length,1);
-		#if !cpp
 		f( ~/\\/.match(str) );
-		#end
 
 		eq(str2.indexOf("\\"), 2);
 		eq(str2.lastIndexOf("\\"), 2);
@@ -23,4 +21,4 @@ class Issue7247 extends Test {
 	}
 
 	#end
-}
+}