mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Never again will changes to 'sample.js' bite us in the ass
This commit is contained in:
@@ -150,3 +150,19 @@ $.fn.textInput = (data) ->
|
||||
|
||||
$.fn.simulateDomAttachment = ->
|
||||
$('<html>').append(this)
|
||||
|
||||
throw "Sample.js is modified" unless fs.read(require.resolve('fixtures/sample.js')) == """
|
||||
var quicksort = function () {
|
||||
var sort = function(items) {
|
||||
if (items.length <= 1) return items;
|
||||
var pivot = items.shift(), current, left = [], right = [];
|
||||
while(items.length > 0) {
|
||||
current = items.shift();
|
||||
current < pivot ? left.push(current) : right.push(current);
|
||||
}
|
||||
return sort(left).concat(pivot).concat(sort(right));
|
||||
};
|
||||
|
||||
return sort(Array.apply(this, arguments));
|
||||
};
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user