fix browser tests

This commit is contained in:
Fabian Jakobs 2011-11-09 17:56:27 +01:00
commit fa7ccc3473
6 changed files with 52 additions and 4 deletions

View file

@ -3,6 +3,8 @@ if (typeof process !== "undefined") {
require("../test/mockdom");
}
define(function(require, exports, module) {
var assert = require("assert");
var highlighter = require("./static_highlight");
var JavaScriptMode = require("../mode/javascript").Mode;
@ -71,4 +73,8 @@ function hello (a, b, c) {\n\
}
};
!module.parent && require("asyncjs").test.testcase(module.exports).exec();
});
if (typeof module !== "undefined" && module === require.main) {
require("asyncjs").test.testcase(module.exports).exec();
}

View file

@ -1,3 +1,40 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var oop = require("../lib/oop");

View file

@ -544,6 +544,6 @@
};
return { Tokenizer: Tokenizer };
module.exports = { Tokenizer: Tokenizer };
});

View file

@ -1892,7 +1892,7 @@ define(function(require, exports, module) {
return n;
}
return {
module.exports = {
parse: parse,
parseStdin: parseStdin,
Node: Node,

View file

@ -17,8 +17,12 @@ var tests = [
require("ace/editor_highlight_selected_word_test"),
require("ace/editor_navigation_test"),
require("ace/editor_text_edit_test"),
require("ace/ext/static_highlight_test"),
require("ace/layer/text_test"),
require("ace/lib/event_emitter_test"),
require("ace/mode/coffee/parser_test"),
require("ace/mode/coffee_tokenizer_test"),
require("ace/mode/coldfusion_test"),
require("ace/mode/css_test"),
require("ace/mode/css_tokenizer_test"),
require("ace/mode/css_worker"),
@ -27,6 +31,7 @@ var tests = [
require("ace/mode/javascript_test"),
require("ace/mode/javascript_tokenizer_test"),
require("ace/mode/javascript_worker_test"),
require("ace/mode/python_test"),
require("ace/mode/ruby_tokenizer_test"),
require("ace/mode/text_test"),
require("ace/mode/xml_test"),
@ -34,7 +39,6 @@ var tests = [
require("ace/range_test"),
require("ace/search_test"),
require("ace/selection_test"),
require("ace/test/event_emitter_test"),
require("ace/virtual_renderer_test")
]

View file

@ -7,6 +7,7 @@
define(function(require, exports, module) {
module.exports = require("./async")
module.exports.test = require("./test")
require("./utils")
})