Further changes for the Use cases on the live site.
[yaffs-website] / node_modules / phantomjs-prebuilt / lib / phantom / examples / stdin-stdout-stderr.js
1 "use strict";
2 var system = require('system');
3
4 system.stdout.write('Hello, system.stdout.write!');
5 system.stdout.writeLine('\nHello, system.stdout.writeLine!');
6
7 system.stderr.write('Hello, system.stderr.write!');
8 system.stderr.writeLine('\nHello, system.stderr.writeLine!');
9
10 system.stdout.writeLine('system.stdin.readLine(): ');
11 var line = system.stdin.readLine();
12 system.stdout.writeLine(JSON.stringify(line));
13
14 // This is essentially a `readAll`
15 system.stdout.writeLine('system.stdin.read(5): (ctrl+D to end)');
16 var input = system.stdin.read(5);
17 system.stdout.writeLine(JSON.stringify(input));
18
19 phantom.exit(0);