소스 검색

more checks

Nicolas Cannasse 17 년 전
부모
커밋
07f2076063
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      tests/unit/TestEReg.hx

+ 8 - 1
tests/unit/TestEReg.hx

@@ -23,7 +23,14 @@ class TestEReg extends Test {
 		eq( r.matchedRight(), "" );
 		eq( r.matched(1), null );
 		eq( r.matched(2), "" );
-		exc(function() r.matched(3));
+		unspec(function() r.matched(3));
+		unspec(function() r.matched(-1));
+
+		var r = ~/^(b)?$/;
+		t( r.match("") );
+		eq( r.matched(0), "" );
+		eq( r.matched(1), null );
+
 		#end
 	}