Bug 745172 - GCLI intro command should be promoted out of 'demo'; r=dcamp

This commit is contained in:
Joe Walker 2012-05-15 11:27:18 +01:00
parent 06506fe449
commit 199aa3120b
3 changed files with 68 additions and 1 deletions

View File

@ -98,7 +98,7 @@ define('gclitest/index', ['require', 'exports', 'module' , 'gclitest/suite'], fu
* http://opensource.org/licenses/BSD-3-Clause
*/
define('gclitest/suite', ['require', 'exports', 'module' , 'gcli/index', 'test/examiner', 'gclitest/testCli', 'gclitest/testCompletion', 'gclitest/testExec', 'gclitest/testHelp', 'gclitest/testHistory', 'gclitest/testInputter', 'gclitest/testJs', 'gclitest/testKeyboard', 'gclitest/testPref', 'gclitest/testRequire', 'gclitest/testResource', 'gclitest/testScratchpad', 'gclitest/testSettings', 'gclitest/testSpell', 'gclitest/testSplit', 'gclitest/testTokenize', 'gclitest/testTooltip', 'gclitest/testTypes', 'gclitest/testUtil'], function(require, exports, module) {
define('gclitest/suite', ['require', 'exports', 'module' , 'gcli/index', 'test/examiner', 'gclitest/testCli', 'gclitest/testCompletion', 'gclitest/testExec', 'gclitest/testHelp', 'gclitest/testHistory', 'gclitest/testInputter', 'gclitest/testIntro', 'gclitest/testJs', 'gclitest/testKeyboard', 'gclitest/testPref', 'gclitest/testRequire', 'gclitest/testResource', 'gclitest/testScratchpad', 'gclitest/testSettings', 'gclitest/testSpell', 'gclitest/testSplit', 'gclitest/testTokenize', 'gclitest/testTooltip', 'gclitest/testTypes', 'gclitest/testUtil'], function(require, exports, module) {
// We need to make sure GCLI is initialized before we begin testing it
require('gcli/index');
@ -114,6 +114,7 @@ define('gclitest/suite', ['require', 'exports', 'module' , 'gcli/index', 'test/e
examiner.addSuite('gclitest/testHelp', require('gclitest/testHelp'));
examiner.addSuite('gclitest/testHistory', require('gclitest/testHistory'));
examiner.addSuite('gclitest/testInputter', require('gclitest/testInputter'));
examiner.addSuite('gclitest/testIntro', require('gclitest/testIntro'));
examiner.addSuite('gclitest/testJs', require('gclitest/testJs'));
examiner.addSuite('gclitest/testKeyboard', require('gclitest/testKeyboard'));
examiner.addSuite('gclitest/testPref', require('gclitest/testPref'));
@ -2065,6 +2066,58 @@ exports.testOutput = function(options) {
};
});
/*
* Copyright 2009-2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE.txt or:
* http://opensource.org/licenses/BSD-3-Clause
*/
define('gclitest/testIntro', ['require', 'exports', 'module' , 'gclitest/helpers', 'test/assert'], function(require, exports, module) {
var helpers = require('gclitest/helpers');
var test = require('test/assert');
exports.testIntroStatus = function(options) {
if (options.isFirefox) {
test.log('Skipping testIntroStatus in Firefox.');
return;
}
helpers.status(options, {
typed: 'intro',
markup: 'VVVVV',
status: 'VALID',
emptyParameters: [ ]
});
helpers.status(options, {
typed: 'intro foo',
markup: 'VVVVVVEEE',
status: 'ERROR',
emptyParameters: [ ]
});
};
exports.testIntroExec = function(options) {
if (options.isFirefox) {
test.log('Skipping testIntroExec in Firefox.');
return;
}
helpers.exec(options, {
typed: 'intro',
args: { },
outputMatch: [
/graphical\s*command\s*line/,
/GCLI/,
/help/,
/F1/,
/Escape/
]
});
};
});
/*
* Copyright 2009-2011 Mozilla Foundation and contributors
@ -3958,6 +4011,7 @@ let testModuleNames = [
'gclitest/helpers',
'gclitest/testHistory',
'gclitest/testInputter',
'gclitest/testIntro',
'gclitest/testJs',
'gclitest/testKeyboard',
'gclitest/testPref',

View File

@ -5729,6 +5729,9 @@ Requisition.prototype.cloneAssignments = function() {
*/
Requisition.prototype.getStatus = function() {
var status = Status.VALID;
if (!this._unassigned.arg.isBlank()) {
return Status.ERROR;
}
this.getAssignments(true).forEach(function(assignment) {
var assignStatus = assignment.getStatus();
if (assignStatus > status) {

View File

@ -257,6 +257,16 @@ prefOutputName=Name
# available preferences
prefOutputValue=Value
# LOCALIZATION NOTE (introDesc): A very short description of the 'intro'
# command. This string is designed to be shown in a menu alongside the command
# name, which is why it should be as short as possible. See introManual for a
# fuller description of what it does.
introDesc=Show the opening message
# LOCALIZATION NOTE (introManual): A fuller description of the 'intro'
# command. Displayed when the user asks for help on what it does.
introManual=Redisplay the message that is shown to new users until they click the 'Got it!' button
# LOCALIZATION NOTE (hideIntroDesc): Short description of the 'hideIntro'
# setting. Displayed when the user asks for help on the settings.
hideIntroDesc=Show the initial welcome message