aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.js')
-rw-r--r--vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.js
new file mode 100644
index 00000000..80a43d38
--- /dev/null
+++ b/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.js
@@ -0,0 +1,18 @@
+var system = require('system');
+
+system.stdout.write('Hello, system.stdout.write!');
+system.stdout.writeLine('\nHello, system.stdout.writeLine!');
+
+system.stderr.write('Hello, system.stderr.write!');
+system.stderr.writeLine('\nHello, system.stderr.writeLine!');
+
+system.stdout.writeLine('system.stdin.readLine(): ');
+var line = system.stdin.readLine();
+system.stdout.writeLine(JSON.stringify(line));
+
+// This is essentially a `readAll`
+system.stdout.writeLine('system.stdin.read(5): (ctrl+D to end)');
+var input = system.stdin.read(5);
+system.stdout.writeLine(JSON.stringify(input));
+
+phantom.exit(0);