michael@0: /* michael@0: * Copyright 2012, Mozilla Foundation and contributors michael@0: * michael@0: * Licensed under the Apache License, Version 2.0 (the "License"); michael@0: * you may not use this file except in compliance with the License. michael@0: * You may obtain a copy of the License at michael@0: * michael@0: * http://www.apache.org/licenses/LICENSE-2.0 michael@0: * michael@0: * Unless required by applicable law or agreed to in writing, software michael@0: * distributed under the License is distributed on an "AS IS" BASIS, michael@0: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. michael@0: * See the License for the specific language governing permissions and michael@0: * limitations under the License. michael@0: */ michael@0: michael@0: 'use strict'; michael@0: // michael@0: michael@0: // THIS FILE IS GENERATED FROM SOURCE IN THE GCLI PROJECT michael@0: // DO NOT EDIT IT DIRECTLY michael@0: michael@0: var exports = {}; michael@0: michael@0: var TEST_URI = "data:text/html;charset=utf-8,

gcli-testShort.js

"; michael@0: michael@0: function test() { michael@0: return Task.spawn(function() { michael@0: let options = yield helpers.openTab(TEST_URI); michael@0: yield helpers.openToolbar(options); michael@0: gcli.addItems(mockCommands.items); michael@0: michael@0: yield helpers.runTests(options, exports); michael@0: michael@0: gcli.removeItems(mockCommands.items); michael@0: yield helpers.closeToolbar(options); michael@0: yield helpers.closeTab(options); michael@0: }).then(finish, helpers.handleError); michael@0: } michael@0: michael@0: // michael@0: michael@0: // var helpers = require('./helpers'); michael@0: michael@0: exports.testBasic = function(options) { michael@0: return helpers.audit(options, [ michael@0: { michael@0: setup: 'tshidden -v', michael@0: check: { michael@0: input: 'tshidden -v', michael@0: hints: ' ', michael@0: markup: 'VVVVVVVVVII', michael@0: cursor: 11, michael@0: current: 'visible', michael@0: status: 'ERROR', michael@0: options: [ ], michael@0: message: '', michael@0: predictions: [ ], michael@0: unassigned: [ ], michael@0: args: { michael@0: command: { name: 'tshidden' }, michael@0: visible: { michael@0: value: undefined, michael@0: arg: ' -v', michael@0: status: 'INCOMPLETE' michael@0: }, michael@0: invisiblestring: { michael@0: value: undefined, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: }, michael@0: invisibleboolean: { michael@0: value: false, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: } michael@0: } michael@0: } michael@0: }, michael@0: { michael@0: setup: 'tshidden -v v', michael@0: check: { michael@0: input: 'tshidden -v v', michael@0: hints: '', michael@0: markup: 'VVVVVVVVVVVVV', michael@0: cursor: 13, michael@0: current: 'visible', michael@0: status: 'VALID', michael@0: options: [ ], michael@0: message: '', michael@0: predictions: [ ], michael@0: unassigned: [ ], michael@0: args: { michael@0: command: { name: 'tshidden' }, michael@0: visible: { michael@0: value: 'v', michael@0: arg: ' -v v', michael@0: status: 'VALID', michael@0: message: '' michael@0: }, michael@0: invisiblestring: { michael@0: value: undefined, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: }, michael@0: invisibleboolean: { michael@0: value: false, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: } michael@0: } michael@0: } michael@0: }, michael@0: { michael@0: setup: 'tshidden -i i', michael@0: check: { michael@0: input: 'tshidden -i i', michael@0: hints: ' [options]', michael@0: markup: 'VVVVVVVVVVVVV', michael@0: cursor: 13, michael@0: current: 'invisiblestring', michael@0: status: 'VALID', michael@0: options: [ ], michael@0: message: '', michael@0: predictions: [ ], michael@0: unassigned: [ ], michael@0: args: { michael@0: command: { name: 'tshidden' }, michael@0: visible: { michael@0: value: undefined, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: }, michael@0: invisiblestring: { michael@0: value: 'i', michael@0: arg: ' -i i', michael@0: status: 'VALID', michael@0: message: '' michael@0: }, michael@0: invisibleboolean: { michael@0: value: false, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: } michael@0: } michael@0: } michael@0: }, michael@0: { michael@0: setup: 'tshidden -b', michael@0: check: { michael@0: input: 'tshidden -b', michael@0: hints: ' [options]', michael@0: markup: 'VVVVVVVVVVV', michael@0: cursor: 11, michael@0: current: 'invisibleboolean', michael@0: status: 'VALID', michael@0: options: [ ], michael@0: message: '', michael@0: predictions: [ ], michael@0: unassigned: [ ], michael@0: args: { michael@0: command: { name: 'tshidden' }, michael@0: visible: { michael@0: value: undefined, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: }, michael@0: invisiblestring: { michael@0: value: undefined, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: }, michael@0: invisibleboolean: { michael@0: value: true, michael@0: arg: ' -b', michael@0: status: 'VALID', michael@0: message: '' michael@0: } michael@0: } michael@0: } michael@0: }, michael@0: { michael@0: setup: 'tshidden -j', michael@0: check: { michael@0: input: 'tshidden -j', michael@0: hints: ' [options]', michael@0: markup: 'VVVVVVVVVEE', michael@0: cursor: 11, michael@0: current: '__unassigned', michael@0: status: 'ERROR', michael@0: options: [ ], michael@0: message: 'Can\'t use \'-j\'.', michael@0: predictions: [ ], michael@0: unassigned: [ ' -j' ], michael@0: args: { michael@0: command: { name: 'tshidden' }, michael@0: visible: { michael@0: value: undefined, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: }, michael@0: invisiblestring: { michael@0: value: undefined, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: }, michael@0: invisibleboolean: { michael@0: value: false, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: } michael@0: } michael@0: } michael@0: }, michael@0: { michael@0: setup: 'tshidden -v jj -b --', michael@0: check: { michael@0: input: 'tshidden -v jj -b --', michael@0: hints: '', michael@0: markup: 'VVVVVVVVVVVVVVVVVVEE', michael@0: cursor: 20, michael@0: current: '__unassigned', michael@0: status: 'ERROR', michael@0: options: [ ], michael@0: message: 'Can\'t use \'--\'.', michael@0: predictions: [ ], michael@0: unassigned: [ ' --' ], michael@0: args: { michael@0: command: { name: 'tshidden' }, michael@0: visible: { michael@0: value: 'jj', michael@0: arg: ' -v jj', michael@0: status: 'VALID', michael@0: message: '' michael@0: }, michael@0: invisiblestring: { michael@0: value: undefined, michael@0: arg: '', michael@0: status: 'VALID', michael@0: message: '' michael@0: }, michael@0: invisibleboolean: { michael@0: value: true, michael@0: arg: ' -b', michael@0: status: 'VALID', michael@0: message: '' michael@0: } michael@0: } michael@0: } michael@0: } michael@0: ]); michael@0: };