michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: function run_test() { michael@0: var file = do_get_file("syntax_error.jsm"); michael@0: var ios = Components.classes["@mozilla.org/network/io-service;1"] michael@0: .getService(Components.interfaces.nsIIOService); michael@0: var uri = ios.newFileURI(file); michael@0: michael@0: try { michael@0: Components.utils.import(uri.spec); michael@0: do_throw("Failed to report any error at all"); michael@0: } catch (e) { michael@0: do_check_neq(/^SyntaxError:/.exec(e + ''), null); michael@0: } michael@0: }