browser/devtools/commandline/test/browser_gcli_file.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /*
michael@0 2 * Copyright 2012, Mozilla Foundation and contributors
michael@0 3 *
michael@0 4 * Licensed under the Apache License, Version 2.0 (the "License");
michael@0 5 * you may not use this file except in compliance with the License.
michael@0 6 * You may obtain a copy of the License at
michael@0 7 *
michael@0 8 * http://www.apache.org/licenses/LICENSE-2.0
michael@0 9 *
michael@0 10 * Unless required by applicable law or agreed to in writing, software
michael@0 11 * distributed under the License is distributed on an "AS IS" BASIS,
michael@0 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
michael@0 13 * See the License for the specific language governing permissions and
michael@0 14 * limitations under the License.
michael@0 15 */
michael@0 16
michael@0 17 'use strict';
michael@0 18 // <INJECTED SOURCE:START>
michael@0 19
michael@0 20 // THIS FILE IS GENERATED FROM SOURCE IN THE GCLI PROJECT
michael@0 21 // DO NOT EDIT IT DIRECTLY
michael@0 22
michael@0 23 var exports = {};
michael@0 24
michael@0 25 var TEST_URI = "data:text/html;charset=utf-8,<p id='gcli-input'>gcli-testFile.js</p>";
michael@0 26
michael@0 27 function test() {
michael@0 28 return Task.spawn(function() {
michael@0 29 let options = yield helpers.openTab(TEST_URI);
michael@0 30 yield helpers.openToolbar(options);
michael@0 31 gcli.addItems(mockCommands.items);
michael@0 32
michael@0 33 yield helpers.runTests(options, exports);
michael@0 34
michael@0 35 gcli.removeItems(mockCommands.items);
michael@0 36 yield helpers.closeToolbar(options);
michael@0 37 yield helpers.closeTab(options);
michael@0 38 }).then(finish, helpers.handleError);
michael@0 39 }
michael@0 40
michael@0 41 // <INJECTED SOURCE:END>
michael@0 42
michael@0 43 // var helpers = require('./helpers');
michael@0 44
michael@0 45 var local = false;
michael@0 46
michael@0 47 exports.testBasic = function(options) {
michael@0 48 return helpers.audit(options, [
michael@0 49 {
michael@0 50 // These tests require us to be using node directly or to be in
michael@0 51 // PhantomJS connected to an execute enabled node server or to be in
michael@0 52 // firefox.
michael@0 53 skipRemainingIf: options.isPhantomjs || options.isFirefox,
michael@0 54 setup: 'tsfile open /',
michael@0 55 check: {
michael@0 56 input: 'tsfile open /',
michael@0 57 hints: '',
michael@0 58 markup: 'VVVVVVVVVVVVI',
michael@0 59 cursor: 13,
michael@0 60 current: 'p1',
michael@0 61 status: 'ERROR',
michael@0 62 message: '\'/\' is not a file',
michael@0 63 args: {
michael@0 64 command: { name: 'tsfile open' },
michael@0 65 p1: {
michael@0 66 value: undefined,
michael@0 67 arg: ' /',
michael@0 68 status: 'INCOMPLETE',
michael@0 69 message: '\'/\' is not a file'
michael@0 70 }
michael@0 71 }
michael@0 72 }
michael@0 73 },
michael@0 74 {
michael@0 75 setup: 'tsfile open /zxcv',
michael@0 76 check: {
michael@0 77 input: 'tsfile open /zxcv',
michael@0 78 // hints: ' -> /etc/',
michael@0 79 markup: 'VVVVVVVVVVVVIIIII',
michael@0 80 cursor: 17,
michael@0 81 current: 'p1',
michael@0 82 status: 'ERROR',
michael@0 83 message: '\'/zxcv\' doesn\'t exist',
michael@0 84 args: {
michael@0 85 command: { name: 'tsfile open' },
michael@0 86 p1: {
michael@0 87 value: undefined,
michael@0 88 arg: ' /zxcv',
michael@0 89 status: 'INCOMPLETE',
michael@0 90 message: '\'/zxcv\' doesn\'t exist'
michael@0 91 }
michael@0 92 }
michael@0 93 }
michael@0 94 },
michael@0 95 {
michael@0 96 skipIf: !local,
michael@0 97 setup: 'tsfile open /mach_kernel',
michael@0 98 check: {
michael@0 99 input: 'tsfile open /mach_kernel',
michael@0 100 hints: '',
michael@0 101 markup: 'VVVVVVVVVVVVVVVVVVVVVVVV',
michael@0 102 cursor: 24,
michael@0 103 current: 'p1',
michael@0 104 status: 'VALID',
michael@0 105 message: '',
michael@0 106 args: {
michael@0 107 command: { name: 'tsfile open' },
michael@0 108 p1: {
michael@0 109 value: '/mach_kernel',
michael@0 110 arg: ' /mach_kernel',
michael@0 111 status: 'VALID',
michael@0 112 message: ''
michael@0 113 }
michael@0 114 }
michael@0 115 }
michael@0 116 },
michael@0 117 {
michael@0 118 setup: 'tsfile saveas /',
michael@0 119 check: {
michael@0 120 input: 'tsfile saveas /',
michael@0 121 hints: '',
michael@0 122 markup: 'VVVVVVVVVVVVVVI',
michael@0 123 cursor: 15,
michael@0 124 current: 'p1',
michael@0 125 status: 'ERROR',
michael@0 126 message: '\'/\' already exists',
michael@0 127 args: {
michael@0 128 command: { name: 'tsfile saveas' },
michael@0 129 p1: {
michael@0 130 value: undefined,
michael@0 131 arg: ' /',
michael@0 132 status: 'INCOMPLETE',
michael@0 133 message: '\'/\' already exists'
michael@0 134 }
michael@0 135 }
michael@0 136 }
michael@0 137 },
michael@0 138 {
michael@0 139 setup: 'tsfile saveas /zxcv',
michael@0 140 check: {
michael@0 141 input: 'tsfile saveas /zxcv',
michael@0 142 // hints: ' -> /etc/',
michael@0 143 markup: 'VVVVVVVVVVVVVVVVVVV',
michael@0 144 cursor: 19,
michael@0 145 current: 'p1',
michael@0 146 status: 'VALID',
michael@0 147 message: '',
michael@0 148 args: {
michael@0 149 command: { name: 'tsfile saveas' },
michael@0 150 p1: {
michael@0 151 value: '/zxcv',
michael@0 152 arg: ' /zxcv',
michael@0 153 status: 'VALID',
michael@0 154 message: ''
michael@0 155 }
michael@0 156 }
michael@0 157 }
michael@0 158 },
michael@0 159 {
michael@0 160 skipIf: !local,
michael@0 161 setup: 'tsfile saveas /mach_kernel',
michael@0 162 check: {
michael@0 163 input: 'tsfile saveas /mach_kernel',
michael@0 164 hints: '',
michael@0 165 markup: 'VVVVVVVVVVVVVVIIIIIIIIIIII',
michael@0 166 cursor: 26,
michael@0 167 current: 'p1',
michael@0 168 status: 'ERROR',
michael@0 169 message: '\'/mach_kernel\' already exists',
michael@0 170 args: {
michael@0 171 command: { name: 'tsfile saveas' },
michael@0 172 p1: {
michael@0 173 value: undefined,
michael@0 174 arg: ' /mach_kernel',
michael@0 175 status: 'INCOMPLETE',
michael@0 176 message: '\'/mach_kernel\' already exists'
michael@0 177 }
michael@0 178 }
michael@0 179 }
michael@0 180 },
michael@0 181 {
michael@0 182 setup: 'tsfile save /',
michael@0 183 check: {
michael@0 184 input: 'tsfile save /',
michael@0 185 hints: '',
michael@0 186 markup: 'VVVVVVVVVVVVI',
michael@0 187 cursor: 13,
michael@0 188 current: 'p1',
michael@0 189 status: 'ERROR',
michael@0 190 message: '\'/\' is not a file',
michael@0 191 args: {
michael@0 192 command: { name: 'tsfile save' },
michael@0 193 p1: {
michael@0 194 value: undefined,
michael@0 195 arg: ' /',
michael@0 196 status: 'INCOMPLETE',
michael@0 197 message: '\'/\' is not a file'
michael@0 198 }
michael@0 199 }
michael@0 200 }
michael@0 201 },
michael@0 202 {
michael@0 203 setup: 'tsfile save /zxcv',
michael@0 204 check: {
michael@0 205 input: 'tsfile save /zxcv',
michael@0 206 // hints: ' -> /etc/',
michael@0 207 markup: 'VVVVVVVVVVVVVVVVV',
michael@0 208 cursor: 17,
michael@0 209 current: 'p1',
michael@0 210 status: 'VALID',
michael@0 211 message: '',
michael@0 212 args: {
michael@0 213 command: { name: 'tsfile save' },
michael@0 214 p1: {
michael@0 215 value: '/zxcv',
michael@0 216 arg: ' /zxcv',
michael@0 217 status: 'VALID',
michael@0 218 message: ''
michael@0 219 }
michael@0 220 }
michael@0 221 }
michael@0 222 },
michael@0 223 {
michael@0 224 skipIf: !local,
michael@0 225 setup: 'tsfile save /mach_kernel',
michael@0 226 check: {
michael@0 227 input: 'tsfile save /mach_kernel',
michael@0 228 hints: '',
michael@0 229 markup: 'VVVVVVVVVVVVVVVVVVVVVVVV',
michael@0 230 cursor: 24,
michael@0 231 current: 'p1',
michael@0 232 status: 'VALID',
michael@0 233 message: '',
michael@0 234 args: {
michael@0 235 command: { name: 'tsfile save' },
michael@0 236 p1: {
michael@0 237 value: '/mach_kernel',
michael@0 238 arg: ' /mach_kernel',
michael@0 239 status: 'VALID',
michael@0 240 message: ''
michael@0 241 }
michael@0 242 }
michael@0 243 }
michael@0 244 },
michael@0 245 {
michael@0 246 setup: 'tsfile cd /',
michael@0 247 check: {
michael@0 248 input: 'tsfile cd /',
michael@0 249 hints: '',
michael@0 250 markup: 'VVVVVVVVVVV',
michael@0 251 cursor: 11,
michael@0 252 current: 'p1',
michael@0 253 status: 'VALID',
michael@0 254 message: '',
michael@0 255 args: {
michael@0 256 command: { name: 'tsfile cd' },
michael@0 257 p1: {
michael@0 258 value: '/',
michael@0 259 arg: ' /',
michael@0 260 status: 'VALID',
michael@0 261 message: ''
michael@0 262 }
michael@0 263 }
michael@0 264 }
michael@0 265 },
michael@0 266 {
michael@0 267 setup: 'tsfile cd /zxcv',
michael@0 268 check: {
michael@0 269 input: 'tsfile cd /zxcv',
michael@0 270 // hints: ' -> /dev/',
michael@0 271 markup: 'VVVVVVVVVVIIIII',
michael@0 272 cursor: 15,
michael@0 273 current: 'p1',
michael@0 274 status: 'ERROR',
michael@0 275 message: '\'/zxcv\' doesn\'t exist',
michael@0 276 args: {
michael@0 277 command: { name: 'tsfile cd' },
michael@0 278 p1: {
michael@0 279 value: undefined,
michael@0 280 arg: ' /zxcv',
michael@0 281 status: 'INCOMPLETE',
michael@0 282 message: '\'/zxcv\' doesn\'t exist'
michael@0 283 }
michael@0 284 }
michael@0 285 }
michael@0 286 },
michael@0 287 {
michael@0 288 skipIf: true || !local,
michael@0 289 setup: 'tsfile cd /etc/passwd',
michael@0 290 check: {
michael@0 291 input: 'tsfile cd /etc/passwd',
michael@0 292 hints: ' -> /etc/pam.d/',
michael@0 293 markup: 'VVVVVVVVVVIIIIIIIIIII',
michael@0 294 cursor: 21,
michael@0 295 current: 'p1',
michael@0 296 status: 'ERROR',
michael@0 297 message: '\'/etc/passwd\' is not a directory',
michael@0 298 args: {
michael@0 299 command: { name: 'tsfile cd' },
michael@0 300 p1: {
michael@0 301 value: undefined,
michael@0 302 arg: ' /etc/passwd',
michael@0 303 status: 'INCOMPLETE',
michael@0 304 message: '\'/etc/passwd\' is not a directory'
michael@0 305 }
michael@0 306 }
michael@0 307 }
michael@0 308 },
michael@0 309 {
michael@0 310 setup: 'tsfile mkdir /',
michael@0 311 check: {
michael@0 312 input: 'tsfile mkdir /',
michael@0 313 hints: '',
michael@0 314 markup: 'VVVVVVVVVVVVVI',
michael@0 315 cursor: 14,
michael@0 316 current: 'p1',
michael@0 317 status: 'ERROR',
michael@0 318 message: ''/' already exists',
michael@0 319 args: {
michael@0 320 command: { name: 'tsfile mkdir' },
michael@0 321 p1: {
michael@0 322 value: undefined,
michael@0 323 arg: ' /',
michael@0 324 status: 'INCOMPLETE',
michael@0 325 message: '\'/\' already exists'
michael@0 326 }
michael@0 327 }
michael@0 328 }
michael@0 329 },
michael@0 330 {
michael@0 331 setup: 'tsfile mkdir /zxcv',
michael@0 332 check: {
michael@0 333 input: 'tsfile mkdir /zxcv',
michael@0 334 // hints: ' -> /dev/',
michael@0 335 markup: 'VVVVVVVVVVVVVVVVVV',
michael@0 336 cursor: 18,
michael@0 337 current: 'p1',
michael@0 338 status: 'VALID',
michael@0 339 message: '',
michael@0 340 args: {
michael@0 341 command: { name: 'tsfile mkdir' },
michael@0 342 p1: {
michael@0 343 value: '/zxcv',
michael@0 344 arg: ' /zxcv',
michael@0 345 status: 'VALID',
michael@0 346 message: ''
michael@0 347 }
michael@0 348 }
michael@0 349 }
michael@0 350 },
michael@0 351 {
michael@0 352 skipIf: !local,
michael@0 353 setup: 'tsfile mkdir /mach_kernel',
michael@0 354 check: {
michael@0 355 input: 'tsfile mkdir /mach_kernel',
michael@0 356 hints: '',
michael@0 357 markup: 'VVVVVVVVVVVVVIIIIIIIIIIII',
michael@0 358 cursor: 25,
michael@0 359 current: 'p1',
michael@0 360 status: 'ERROR',
michael@0 361 message: '\'/mach_kernel\' already exists',
michael@0 362 args: {
michael@0 363 command: { name: 'tsfile mkdir' },
michael@0 364 p1: {
michael@0 365 value: undefined,
michael@0 366 arg: ' /mach_kernel',
michael@0 367 status: 'INCOMPLETE',
michael@0 368 message: '\'/mach_kernel\' already exists'
michael@0 369 }
michael@0 370 }
michael@0 371 }
michael@0 372 },
michael@0 373 {
michael@0 374 setup: 'tsfile rm /',
michael@0 375 check: {
michael@0 376 input: 'tsfile rm /',
michael@0 377 hints: '',
michael@0 378 markup: 'VVVVVVVVVVV',
michael@0 379 cursor: 11,
michael@0 380 current: 'p1',
michael@0 381 status: 'VALID',
michael@0 382 message: '',
michael@0 383 args: {
michael@0 384 command: { name: 'tsfile rm' },
michael@0 385 p1: {
michael@0 386 value: '/',
michael@0 387 arg: ' /',
michael@0 388 status: 'VALID',
michael@0 389 message: ''
michael@0 390 }
michael@0 391 }
michael@0 392 }
michael@0 393 },
michael@0 394 {
michael@0 395 setup: 'tsfile rm /zxcv',
michael@0 396 check: {
michael@0 397 input: 'tsfile rm /zxcv',
michael@0 398 // hints: ' -> /etc/',
michael@0 399 markup: 'VVVVVVVVVVIIIII',
michael@0 400 cursor: 15,
michael@0 401 current: 'p1',
michael@0 402 status: 'ERROR',
michael@0 403 message: '\'/zxcv\' doesn\'t exist',
michael@0 404 args: {
michael@0 405 command: { name: 'tsfile rm' },
michael@0 406 p1: {
michael@0 407 value: undefined,
michael@0 408 arg: ' /zxcv',
michael@0 409 status: 'INCOMPLETE',
michael@0 410 message: '\'/zxcv\' doesn\'t exist'
michael@0 411 }
michael@0 412 }
michael@0 413 }
michael@0 414 },
michael@0 415 {
michael@0 416 skipIf: !local,
michael@0 417 setup: 'tsfile rm /mach_kernel',
michael@0 418 check: {
michael@0 419 input: 'tsfile rm /mach_kernel',
michael@0 420 hints: '',
michael@0 421 markup: 'VVVVVVVVVVVVVVVVVVVVVV',
michael@0 422 cursor: 22,
michael@0 423 current: 'p1',
michael@0 424 status: 'VALID',
michael@0 425 message: '',
michael@0 426 args: {
michael@0 427 command: { name: 'tsfile rm' },
michael@0 428 p1: {
michael@0 429 value: '/mach_kernel',
michael@0 430 arg: ' /mach_kernel',
michael@0 431 status: 'VALID',
michael@0 432 message: ''
michael@0 433 }
michael@0 434 }
michael@0 435 }
michael@0 436 }
michael@0 437 ]);
michael@0 438 };
michael@0 439
michael@0 440 exports.testFirefoxBasic = function(options) {
michael@0 441 return helpers.audit(options, [
michael@0 442 {
michael@0 443 // These tests are just like the ones above tailored for running in
michael@0 444 // Firefox
michael@0 445 skipRemainingIf: true,
michael@0 446 // skipRemainingIf: !options.isFirefox,
michael@0 447 skipIf: true,
michael@0 448 setup: 'tsfile open /',
michael@0 449 check: {
michael@0 450 input: 'tsfile open /',
michael@0 451 hints: '',
michael@0 452 markup: 'VVVVVVVVVVVVI',
michael@0 453 cursor: 13,
michael@0 454 current: 'p1',
michael@0 455 status: 'ERROR',
michael@0 456 message: '\'/\' is not a file',
michael@0 457 args: {
michael@0 458 command: { name: 'tsfile open' },
michael@0 459 p1: {
michael@0 460 value: undefined,
michael@0 461 arg: ' /',
michael@0 462 status: 'INCOMPLETE',
michael@0 463 message: '\'/\' is not a file'
michael@0 464 }
michael@0 465 }
michael@0 466 }
michael@0 467 },
michael@0 468 {
michael@0 469 skipIf: true,
michael@0 470 setup: 'tsfile open /zxcv',
michael@0 471 check: {
michael@0 472 input: 'tsfile open /zxcv',
michael@0 473 // hints: ' -> /etc/',
michael@0 474 markup: 'VVVVVVVVVVVVIIIII',
michael@0 475 cursor: 17,
michael@0 476 current: 'p1',
michael@0 477 status: 'ERROR',
michael@0 478 message: '\'/zxcv\' doesn\'t exist',
michael@0 479 args: {
michael@0 480 command: { name: 'tsfile open' },
michael@0 481 p1: {
michael@0 482 value: undefined,
michael@0 483 arg: ' /zxcv',
michael@0 484 status: 'INCOMPLETE',
michael@0 485 message: '\'/zxcv\' doesn\'t exist'
michael@0 486 }
michael@0 487 }
michael@0 488 }
michael@0 489 },
michael@0 490 {
michael@0 491 skipIf: !local,
michael@0 492 setup: 'tsfile open /mach_kernel',
michael@0 493 check: {
michael@0 494 input: 'tsfile open /mach_kernel',
michael@0 495 hints: '',
michael@0 496 markup: 'VVVVVVVVVVVVVVVVVVVVVVVV',
michael@0 497 cursor: 24,
michael@0 498 current: 'p1',
michael@0 499 status: 'VALID',
michael@0 500 message: '',
michael@0 501 args: {
michael@0 502 command: { name: 'tsfile open' },
michael@0 503 p1: {
michael@0 504 value: '/mach_kernel',
michael@0 505 arg: ' /mach_kernel',
michael@0 506 status: 'VALID',
michael@0 507 message: ''
michael@0 508 }
michael@0 509 }
michael@0 510 }
michael@0 511 },
michael@0 512 {
michael@0 513 skipIf: true,
michael@0 514 setup: 'tsfile saveas /',
michael@0 515 check: {
michael@0 516 input: 'tsfile saveas /',
michael@0 517 hints: '',
michael@0 518 markup: 'VVVVVVVVVVVVVVI',
michael@0 519 cursor: 15,
michael@0 520 current: 'p1',
michael@0 521 status: 'ERROR',
michael@0 522 message: '\'/\' already exists',
michael@0 523 args: {
michael@0 524 command: { name: 'tsfile saveas' },
michael@0 525 p1: {
michael@0 526 value: undefined,
michael@0 527 arg: ' /',
michael@0 528 status: 'INCOMPLETE',
michael@0 529 message: '\'/\' already exists'
michael@0 530 }
michael@0 531 }
michael@0 532 }
michael@0 533 },
michael@0 534 {
michael@0 535 skipIf: true,
michael@0 536 setup: 'tsfile saveas /zxcv',
michael@0 537 check: {
michael@0 538 input: 'tsfile saveas /zxcv',
michael@0 539 // hints: ' -> /etc/',
michael@0 540 markup: 'VVVVVVVVVVVVVVVVVVV',
michael@0 541 cursor: 19,
michael@0 542 current: 'p1',
michael@0 543 status: 'VALID',
michael@0 544 message: '',
michael@0 545 args: {
michael@0 546 command: { name: 'tsfile saveas' },
michael@0 547 p1: {
michael@0 548 value: '/zxcv',
michael@0 549 arg: ' /zxcv',
michael@0 550 status: 'VALID',
michael@0 551 message: ''
michael@0 552 }
michael@0 553 }
michael@0 554 }
michael@0 555 },
michael@0 556 {
michael@0 557 skipIf: !local,
michael@0 558 setup: 'tsfile saveas /mach_kernel',
michael@0 559 check: {
michael@0 560 input: 'tsfile saveas /mach_kernel',
michael@0 561 hints: '',
michael@0 562 markup: 'VVVVVVVVVVVVVVIIIIIIIIIIII',
michael@0 563 cursor: 26,
michael@0 564 current: 'p1',
michael@0 565 status: 'ERROR',
michael@0 566 message: '\'/mach_kernel\' already exists',
michael@0 567 args: {
michael@0 568 command: { name: 'tsfile saveas' },
michael@0 569 p1: {
michael@0 570 value: undefined,
michael@0 571 arg: ' /mach_kernel',
michael@0 572 status: 'INCOMPLETE',
michael@0 573 message: '\'/mach_kernel\' already exists'
michael@0 574 }
michael@0 575 }
michael@0 576 }
michael@0 577 },
michael@0 578 {
michael@0 579 skipIf: true,
michael@0 580 setup: 'tsfile save /',
michael@0 581 check: {
michael@0 582 input: 'tsfile save /',
michael@0 583 hints: '',
michael@0 584 markup: 'VVVVVVVVVVVVI',
michael@0 585 cursor: 13,
michael@0 586 current: 'p1',
michael@0 587 status: 'ERROR',
michael@0 588 message: '\'/\' is not a file',
michael@0 589 args: {
michael@0 590 command: { name: 'tsfile save' },
michael@0 591 p1: {
michael@0 592 value: undefined,
michael@0 593 arg: ' /',
michael@0 594 status: 'INCOMPLETE',
michael@0 595 message: '\'/\' is not a file'
michael@0 596 }
michael@0 597 }
michael@0 598 }
michael@0 599 },
michael@0 600 {
michael@0 601 skipIf: true,
michael@0 602 setup: 'tsfile save /zxcv',
michael@0 603 check: {
michael@0 604 input: 'tsfile save /zxcv',
michael@0 605 // hints: ' -> /etc/',
michael@0 606 markup: 'VVVVVVVVVVVVVVVVV',
michael@0 607 cursor: 17,
michael@0 608 current: 'p1',
michael@0 609 status: 'VALID',
michael@0 610 message: '',
michael@0 611 args: {
michael@0 612 command: { name: 'tsfile save' },
michael@0 613 p1: {
michael@0 614 value: '/zxcv',
michael@0 615 arg: ' /zxcv',
michael@0 616 status: 'VALID',
michael@0 617 message: ''
michael@0 618 }
michael@0 619 }
michael@0 620 }
michael@0 621 },
michael@0 622 {
michael@0 623 skipIf: !local,
michael@0 624 setup: 'tsfile save /mach_kernel',
michael@0 625 check: {
michael@0 626 input: 'tsfile save /mach_kernel',
michael@0 627 hints: '',
michael@0 628 markup: 'VVVVVVVVVVVVVVVVVVVVVVVV',
michael@0 629 cursor: 24,
michael@0 630 current: 'p1',
michael@0 631 status: 'VALID',
michael@0 632 message: '',
michael@0 633 args: {
michael@0 634 command: { name: 'tsfile save' },
michael@0 635 p1: {
michael@0 636 value: '/mach_kernel',
michael@0 637 arg: ' /mach_kernel',
michael@0 638 status: 'VALID',
michael@0 639 message: ''
michael@0 640 }
michael@0 641 }
michael@0 642 }
michael@0 643 },
michael@0 644 {
michael@0 645 setup: 'tsfile cd /',
michael@0 646 check: {
michael@0 647 input: 'tsfile cd /',
michael@0 648 hints: '',
michael@0 649 markup: 'VVVVVVVVVVV',
michael@0 650 cursor: 11,
michael@0 651 current: 'p1',
michael@0 652 status: 'VALID',
michael@0 653 message: '',
michael@0 654 args: {
michael@0 655 command: { name: 'tsfile cd' },
michael@0 656 p1: {
michael@0 657 value: '/',
michael@0 658 arg: ' /',
michael@0 659 status: 'VALID',
michael@0 660 message: ''
michael@0 661 }
michael@0 662 }
michael@0 663 }
michael@0 664 },
michael@0 665 {
michael@0 666 setup: 'tsfile cd /zxcv',
michael@0 667 check: {
michael@0 668 input: 'tsfile cd /zxcv',
michael@0 669 // hints: ' -> /dev/',
michael@0 670 // markup: 'VVVVVVVVVVIIIII',
michael@0 671 cursor: 15,
michael@0 672 current: 'p1',
michael@0 673 // status: 'ERROR',
michael@0 674 message: '\'/zxcv\' doesn\'t exist',
michael@0 675 args: {
michael@0 676 command: { name: 'tsfile cd' },
michael@0 677 p1: {
michael@0 678 value: undefined,
michael@0 679 arg: ' /zxcv',
michael@0 680 // status: 'INCOMPLETE',
michael@0 681 message: '\'/zxcv\' doesn\'t exist'
michael@0 682 }
michael@0 683 }
michael@0 684 }
michael@0 685 },
michael@0 686 {
michael@0 687 skipIf: true || !local,
michael@0 688 setup: 'tsfile cd /etc/passwd',
michael@0 689 check: {
michael@0 690 input: 'tsfile cd /etc/passwd',
michael@0 691 hints: ' -> /etc/pam.d/',
michael@0 692 markup: 'VVVVVVVVVVIIIIIIIIIII',
michael@0 693 cursor: 21,
michael@0 694 current: 'p1',
michael@0 695 status: 'ERROR',
michael@0 696 message: '\'/etc/passwd\' is not a directory',
michael@0 697 args: {
michael@0 698 command: { name: 'tsfile cd' },
michael@0 699 p1: {
michael@0 700 value: undefined,
michael@0 701 arg: ' /etc/passwd',
michael@0 702 status: 'INCOMPLETE',
michael@0 703 message: '\'/etc/passwd\' is not a directory'
michael@0 704 }
michael@0 705 }
michael@0 706 }
michael@0 707 },
michael@0 708 {
michael@0 709 setup: 'tsfile mkdir /',
michael@0 710 check: {
michael@0 711 input: 'tsfile mkdir /',
michael@0 712 hints: '',
michael@0 713 markup: 'VVVVVVVVVVVVVI',
michael@0 714 cursor: 14,
michael@0 715 current: 'p1',
michael@0 716 status: 'ERROR',
michael@0 717 message: ''/' already exists',
michael@0 718 args: {
michael@0 719 command: { name: 'tsfile mkdir' },
michael@0 720 p1: {
michael@0 721 value: undefined,
michael@0 722 arg: ' /',
michael@0 723 status: 'INCOMPLETE',
michael@0 724 message: '\'/\' already exists'
michael@0 725 }
michael@0 726 }
michael@0 727 }
michael@0 728 },
michael@0 729 {
michael@0 730 setup: 'tsfile mkdir /zxcv',
michael@0 731 check: {
michael@0 732 input: 'tsfile mkdir /zxcv',
michael@0 733 // hints: ' -> /dev/',
michael@0 734 markup: 'VVVVVVVVVVVVVVVVVV',
michael@0 735 cursor: 18,
michael@0 736 current: 'p1',
michael@0 737 status: 'VALID',
michael@0 738 message: '',
michael@0 739 args: {
michael@0 740 command: { name: 'tsfile mkdir' },
michael@0 741 p1: {
michael@0 742 value: '/zxcv',
michael@0 743 arg: ' /zxcv',
michael@0 744 status: 'VALID',
michael@0 745 message: ''
michael@0 746 }
michael@0 747 }
michael@0 748 }
michael@0 749 },
michael@0 750 {
michael@0 751 skipIf: !local,
michael@0 752 setup: 'tsfile mkdir /mach_kernel',
michael@0 753 check: {
michael@0 754 input: 'tsfile mkdir /mach_kernel',
michael@0 755 hints: '',
michael@0 756 markup: 'VVVVVVVVVVVVVIIIIIIIIIIII',
michael@0 757 cursor: 25,
michael@0 758 current: 'p1',
michael@0 759 status: 'ERROR',
michael@0 760 message: '\'/mach_kernel\' already exists',
michael@0 761 args: {
michael@0 762 command: { name: 'tsfile mkdir' },
michael@0 763 p1: {
michael@0 764 value: undefined,
michael@0 765 arg: ' /mach_kernel',
michael@0 766 status: 'INCOMPLETE',
michael@0 767 message: '\'/mach_kernel\' already exists'
michael@0 768 }
michael@0 769 }
michael@0 770 }
michael@0 771 },
michael@0 772 {
michael@0 773 skipIf: true,
michael@0 774 setup: 'tsfile rm /',
michael@0 775 check: {
michael@0 776 input: 'tsfile rm /',
michael@0 777 hints: '',
michael@0 778 markup: 'VVVVVVVVVVV',
michael@0 779 cursor: 11,
michael@0 780 current: 'p1',
michael@0 781 status: 'VALID',
michael@0 782 message: '',
michael@0 783 args: {
michael@0 784 command: { name: 'tsfile rm' },
michael@0 785 p1: {
michael@0 786 value: '/',
michael@0 787 arg: ' /',
michael@0 788 status: 'VALID',
michael@0 789 message: ''
michael@0 790 }
michael@0 791 }
michael@0 792 }
michael@0 793 },
michael@0 794 {
michael@0 795 skipIf: true,
michael@0 796 setup: 'tsfile rm /zxcv',
michael@0 797 check: {
michael@0 798 input: 'tsfile rm /zxcv',
michael@0 799 // hints: ' -> /etc/',
michael@0 800 markup: 'VVVVVVVVVVIIIII',
michael@0 801 cursor: 15,
michael@0 802 current: 'p1',
michael@0 803 status: 'ERROR',
michael@0 804 message: '\'/zxcv\' doesn\'t exist',
michael@0 805 args: {
michael@0 806 command: { name: 'tsfile rm' },
michael@0 807 p1: {
michael@0 808 value: undefined,
michael@0 809 arg: ' /zxcv',
michael@0 810 status: 'INCOMPLETE',
michael@0 811 message: '\'/zxcv\' doesn\'t exist'
michael@0 812 }
michael@0 813 }
michael@0 814 }
michael@0 815 },
michael@0 816 {
michael@0 817 skipIf: !local,
michael@0 818 setup: 'tsfile rm /mach_kernel',
michael@0 819 check: {
michael@0 820 input: 'tsfile rm /mach_kernel',
michael@0 821 hints: '',
michael@0 822 markup: 'VVVVVVVVVVVVVVVVVVVVVV',
michael@0 823 cursor: 22,
michael@0 824 current: 'p1',
michael@0 825 status: 'VALID',
michael@0 826 message: '',
michael@0 827 args: {
michael@0 828 command: { name: 'tsfile rm' },
michael@0 829 p1: {
michael@0 830 value: '/mach_kernel',
michael@0 831 arg: ' /mach_kernel',
michael@0 832 status: 'VALID',
michael@0 833 message: ''
michael@0 834 }
michael@0 835 }
michael@0 836 }
michael@0 837 }
michael@0 838 ]);
michael@0 839 };

mercurial