This repository was archived by the owner on Apr 22, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,6 +76,11 @@ <h1>Extract Source Spans Test</h1>
7676}
7777
7878setTimeout ( function ( ) {
79+ function stringify ( s ) {
80+ return JSON . stringify ( s ) . replace ( / \r / g, '\\r' ) . replace ( / \n / g, '\\n' )
81+ . replace ( / \t / g, '\\t' ) ;
82+ }
83+
7984 var testInputs = Array . prototype . slice . call (
8085 document . body . getElementsByClassName ( 'testinput' ) , 0 ) ;
8186 for ( var i = 0 , n = testInputs . length ; i < n ; ++ i ) {
@@ -106,7 +111,7 @@ <h1>Extract Source Spans Test</h1>
106111 var goldenText = testResult . innerText || testResult . textContent ;
107112 var passed = actualText === goldenText ;
108113 if ( ! passed ) {
109- console . log ( JSON . stringify ( actualText ) + ' !==\n' + JSON . stringify ( goldenText ) ) ;
114+ console . log ( stringify ( actualText ) + ' !==\n' + stringify ( goldenText ) ) ;
110115 }
111116 actual . className += passed ? ' ok' : ' failure' ;
112117 } catch ( ex ) {
@@ -118,5 +123,5 @@ <h1>Extract Source Spans Test</h1>
118123
119124< hr >
120125< address > </ address >
121- <!-- hhmts start --> Last modified: Tue Mar 29 15:47:29 PDT 2011 <!-- hhmts end -->
126+ <!-- hhmts start --> Last modified: Tue Mar 29 16:13:48 PDT 2011 <!-- hhmts end -->
122127</ body > </ html >
You can’t perform that action at this time.
0 commit comments