Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#15775 closed defect (fixed)

tests._base._loader.bootstrap fails on line-endings

Reported by: jonathansampson Owned by: Rawld Gill
Priority: undecided Milestone: 1.9
Component: Loader Version: 1.7.3
Keywords: Cc:
Blocked By: Blocking:

Description

Unit test assumes only \n for line-endings. Results in a failed test. Expanding the pattern to seek out and replace \r\n|\r|\n resolves issue:

function getText(t){
  var ending = /(\r\n|\r|\n)/g;
  if(require.getText){
    var text = require.getText(require.toUrl("dojo/tests/_base/loader/getText.txt")).replace(ending, "");
    t.assertEqual("dojo._getText() test data", text);
    if(dojo._getText){
      text = dojo._getText(require.toUrl("dojo/tests/_base/loader/getText.txt")).replace(ending, "");
      t.assertEqual("dojo._getText() test data", text);
    }
  }
}

Attachments (1)

bootstrap.js (4.5 KB) - added by jonathansampson 7 years ago.
Corrected text file.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by jonathansampson

Attachment: bootstrap.js added

Corrected text file.

comment:1 Changed 6 years ago by Rawld Gill

Resolution: fixed
Status: newclosed

In [30811]:

repair improper test assert; thanks jonathansampson; fixes #15775; refs #15774, #15771

comment:2 Changed 6 years ago by Rawld Gill

Milestone: tbd1.9
Note: See TracTickets for help on using tickets.