We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b260061 commit e793947Copy full SHA for e793947
test/parallel/test-linux-dev-stdin.js
@@ -12,6 +12,15 @@ if (!common.isLinux) {
12
13
const child_process = require('child_process');
14
const assert = require('assert');
15
+const fs = require('fs');
16
17
const cp = child_process.execSync(`printf 'console.log(1)' | "${process.execPath}" /dev/stdin`, { stdio: 'pipe' });
18
assert.strictEqual(cp.toString(), '1\n');
19
+
20
+if (fs.existsSync('/tmp/stdin')) {
21
+ fs.unlinkSync('/tmp/stdin');
22
+}
23
+fs.symlinkSync('/dev/stdin', '/tmp/stdin');
24
+const cp2 = child_process.execSync(`printf 'console.log(2)' | "${process.execPath}" /tmp/stdin`, { stdio: 'pipe' });
25
+assert.strictEqual(cp2.toString(), '2\n');
26
+fs.unlinkSync('/tmp/stdin');
0 commit comments