* Test command handling.
(assert)
| 140 | * Test command handling. |
| 141 | */ |
| 142 | function testCommands(assert) { |
| 143 | mockShell([ |
| 144 | // { query: 5, method: 'shell.run', args: { tokens: [ 'pwd' ], ref: 7 } }, |
| 145 | { query: 5, method: 'shell.run', args: { tokens: [ 'cat', 'test.js' ], ref: 4 } }, |
| 146 | ], function (messages, success) { |
| 147 | /* |
| 148 | for (i in messages) { |
| 149 | console.log(messages[i]); |
| 150 | messages[i].args && messages[i].args.objects && console.log('Objects', messages[i].args.objects); |
| 151 | } |
| 152 | */ |
| 153 | var last = messages[messages.length - 1]; |
| 154 | assert(last.success && last.answer == 5, "Run single command"); |
| 155 | }); |
| 156 | } |
| 157 | |
| 158 | /** |
| 159 | * Test mime-type handling. |