Skip to content

Commit

Permalink
guard against failing IE8 tests (closes HaxeFoundation#2575)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Feb 24, 2014
1 parent f9bcb4b commit ab8778b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tests/unit/TestDCE.hx
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ class TestDCE extends Test {
try {
throw c;
} catch (_:Dynamic) { }
#if js
if (!js.Browser.supported || js.Browser.navigator.userAgent.indexOf('MSIE 8') == -1)
#end
hf(ThrownWithToString, "toString");
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/TestEReg.hx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class TestEReg extends Test {
eq( r.matched(0), "aaa" );
eq( r.matchedLeft(), "" );
eq( r.matchedRight(), "" );
eq( r.matched(1), null ); // JS/IE7-8 bug
t(r.matched(1) == null #if js || (js.Browser.supported && js.Browser.navigator.userAgent.indexOf('MSIE 8') > -1) #end); // JS/IE7-8 bug
eq( r.matched(2), "" );
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 ); // JS/IE7-8 bug
t(r.matched(1) == null #if js || (js.Browser.supported && js.Browser.navigator.userAgent.indexOf('MSIE 8') > -1) #end); // JS/IE7-8 bug

t( ~/\//.match("/") );

Expand Down

0 comments on commit ab8778b

Please sign in to comment.