[Pkg-javascript-commits] [node-exit] 01/02: Imported Upstream version 0.1.2

Thorsten Alteholz alteholz at moszumanska.debian.org
Thu Feb 4 20:48:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

alteholz pushed a commit to branch master
in repository node-exit.

commit 42edb6d39d54ce85f11c4f40bc509f5627f46093
Author: Thorsten Alteholz <debian at alteholz.de>
Date:   Thu Feb 4 21:48:45 2016 +0100

    Imported Upstream version 0.1.2
---
 .gitignore                           |    1 +
 .jshintrc                            |   14 +
 .travis.yml                          |    6 +
 Gruntfile.js                         |   48 +
 LICENSE-MIT                          |   22 +
 README.md                            |   75 ++
 lib/exit.js                          |   41 +
 package.json                         |   47 +
 test/exit_test.js                    |  121 ++
 test/fixtures/10-stderr.txt          |   10 +
 test/fixtures/10-stdout-stderr.txt   |   20 +
 test/fixtures/10-stdout.txt          |   10 +
 test/fixtures/100-stderr.txt         |  100 ++
 test/fixtures/100-stdout-stderr.txt  |  200 ++++
 test/fixtures/100-stdout.txt         |  100 ++
 test/fixtures/1000-stderr.txt        | 1000 +++++++++++++++++
 test/fixtures/1000-stdout-stderr.txt | 2000 ++++++++++++++++++++++++++++++++++
 test/fixtures/1000-stdout.txt        | 1000 +++++++++++++++++
 test/fixtures/create-files.sh        |    8 +
 test/fixtures/log-broken.js          |   23 +
 test/fixtures/log.js                 |   25 +
 21 files changed, 4871 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+node_modules
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 0000000..2b7e39b
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,14 @@
+{
+  "curly": true,
+  "eqeqeq": true,
+  "immed": true,
+  "latedef": "nofunc",
+  "newcap": true,
+  "noarg": true,
+  "sub": true,
+  "undef": true,
+  "unused": true,
+  "boss": true,
+  "eqnull": true,
+  "node": true
+}
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..42d4302
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+  - 0.8
+  - '0.10'
+before_script:
+  - npm install -g grunt-cli
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..ff37751
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,48 @@
+'use strict';
+
+module.exports = function(grunt) {
+
+  // Project configuration.
+  grunt.initConfig({
+    nodeunit: {
+      files: ['test/**/*_test.js'],
+    },
+    jshint: {
+      options: {
+        jshintrc: '.jshintrc'
+      },
+      gruntfile: {
+        src: 'Gruntfile.js'
+      },
+      lib: {
+        src: ['lib/**/*.js']
+      },
+      test: {
+        src: ['test/**/*.js']
+      },
+    },
+    watch: {
+      gruntfile: {
+        files: '<%= jshint.gruntfile.src %>',
+        tasks: ['jshint:gruntfile']
+      },
+      lib: {
+        files: '<%= jshint.lib.src %>',
+        tasks: ['jshint:lib', 'nodeunit']
+      },
+      test: {
+        files: '<%= jshint.test.src %>',
+        tasks: ['jshint:test', 'nodeunit']
+      },
+    },
+  });
+
+  // These plugins provide necessary tasks.
+  grunt.loadNpmTasks('grunt-contrib-nodeunit');
+  grunt.loadNpmTasks('grunt-contrib-jshint');
+  grunt.loadNpmTasks('grunt-contrib-watch');
+
+  // Default task.
+  grunt.registerTask('default', ['jshint', 'nodeunit']);
+
+};
diff --git a/LICENSE-MIT b/LICENSE-MIT
new file mode 100644
index 0000000..bb2aad6
--- /dev/null
+++ b/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2013 "Cowboy" Ben Alman
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..20c364e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,75 @@
+# exit [![Build Status](https://secure.travis-ci.org/cowboy/node-exit.png?branch=master)](http://travis-ci.org/cowboy/node-exit)
+
+A replacement for process.exit that ensures stdio are fully drained before exiting.
+
+To make a long story short, if `process.exit` is called on Windows, script output is often truncated when pipe-redirecting `stdout` or `stderr`. This module attempts to work around this issue by waiting until those streams have been completely drained before actually calling `process.exit`.
+
+See [Node.js issue #3584](https://github.com/joyent/node/issues/3584) for further reference.
+
+Tested in OS X 10.8, Windows 7 on Node.js 0.8.25 and 0.10.18.
+
+Based on some code by [@vladikoff](https://github.com/vladikoff).
+
+## Getting Started
+Install the module with: `npm install exit`
+
+```javascript
+var exit = require('exit');
+
+// These lines should appear in the output, EVEN ON WINDOWS.
+console.log("omg");
+console.error("yay");
+
+// process.exit(5);
+exit(5);
+
+// These lines shouldn't appear in the output.
+console.log("wtf");
+console.error("bro");
+```
+
+## Don't believe me? Try it for yourself.
+
+In Windows, clone the repo and cd to the `test\fixtures` directory. The only difference between [log.js](test/fixtures/log.js) and [log-broken.js](test/fixtures/log-broken.js) is that the former uses `exit` while the latter calls `process.exit` directly.
+
+This test was done using cmd.exe, but you can see the same results using `| grep "std"` in either PowerShell or git-bash.
+
+```
+C:\node-exit\test\fixtures>node log.js 0 10 stdout stderr 2>&1 | find "std"
+stdout 0
+stderr 0
+stdout 1
+stderr 1
+stdout 2
+stderr 2
+stdout 3
+stderr 3
+stdout 4
+stderr 4
+stdout 5
+stderr 5
+stdout 6
+stderr 6
+stdout 7
+stderr 7
+stdout 8
+stderr 8
+stdout 9
+stderr 9
+
+C:\node-exit\test\fixtures>node log-broken.js 0 10 stdout stderr 2>&1 | find "std"
+
+C:\node-exit\test\fixtures>
+```
+
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
+
+## Release History
+2013-11-26 - v0.1.2 - Fixed a bug with hanging processes.  
+2013-09-26 - v0.1.1 - Fixed some bugs. It seems to actually work now!  
+2013-09-20 - v0.1.0 - Initial release.
+
+## License
+Copyright (c) 2013 "Cowboy" Ben Alman  
+Licensed under the MIT license.
diff --git a/lib/exit.js b/lib/exit.js
new file mode 100644
index 0000000..2883e05
--- /dev/null
+++ b/lib/exit.js
@@ -0,0 +1,41 @@
+/*
+ * exit
+ * https://github.com/cowboy/node-exit
+ *
+ * Copyright (c) 2013 "Cowboy" Ben Alman
+ * Licensed under the MIT license.
+ */
+
+'use strict';
+
+module.exports = function exit(exitCode, streams) {
+  if (!streams) { streams = [process.stdout, process.stderr]; }
+  var drainCount = 0;
+  // Actually exit if all streams are drained.
+  function tryToExit() {
+    if (drainCount === streams.length) {
+      process.exit(exitCode);
+    }
+  }
+  streams.forEach(function(stream) {
+    // Count drained streams now, but monitor non-drained streams.
+    if (stream.bufferSize === 0) {
+      drainCount++;
+    } else {
+      stream.write('', 'utf-8', function() {
+        drainCount++;
+        tryToExit();
+      });
+    }
+    // Prevent further writing.
+    stream.write = function() {};
+  });
+  // If all streams were already drained, exit now.
+  tryToExit();
+  // In Windows, when run as a Node.js child process, a script utilizing
+  // this library might just exit with a 0 exit code, regardless. This code,
+  // despite the fact that it looks a bit crazy, appears to fix that.
+  process.on('exit', function() {
+    process.exit(exitCode);
+  });
+};
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..8513e30
--- /dev/null
+++ b/package.json
@@ -0,0 +1,47 @@
+{
+  "name": "exit",
+  "description": "A replacement for process.exit that ensures stdio are fully drained before exiting.",
+  "version": "0.1.2",
+  "homepage": "https://github.com/cowboy/node-exit",
+  "author": {
+    "name": "\"Cowboy\" Ben Alman",
+    "url": "http://benalman.com/"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/cowboy/node-exit.git"
+  },
+  "bugs": {
+    "url": "https://github.com/cowboy/node-exit/issues"
+  },
+  "licenses": [
+    {
+      "type": "MIT",
+      "url": "https://github.com/cowboy/node-exit/blob/master/LICENSE-MIT"
+    }
+  ],
+  "main": "lib/exit",
+  "engines": {
+    "node": ">= 0.8.0"
+  },
+  "scripts": {
+    "test": "grunt nodeunit"
+  },
+  "devDependencies": {
+    "grunt-contrib-jshint": "~0.6.4",
+    "grunt-contrib-nodeunit": "~0.2.0",
+    "grunt-contrib-watch": "~0.5.3",
+    "grunt": "~0.4.1",
+    "which": "~1.0.5"
+  },
+  "keywords": [
+    "exit",
+    "process",
+    "stdio",
+    "stdout",
+    "stderr",
+    "drain",
+    "flush",
+    "3584"
+  ]
+}
diff --git a/test/exit_test.js b/test/exit_test.js
new file mode 100644
index 0000000..a91afb9
--- /dev/null
+++ b/test/exit_test.js
@@ -0,0 +1,121 @@
+'use strict';
+
+/*
+  ======== A Handy Little Nodeunit Reference ========
+  https://github.com/caolan/nodeunit
+
+  Test methods:
+    test.expect(numAssertions)
+    test.done()
+  Test assertions:
+    test.ok(value, [message])
+    test.equal(actual, expected, [message])
+    test.notEqual(actual, expected, [message])
+    test.deepEqual(actual, expected, [message])
+    test.notDeepEqual(actual, expected, [message])
+    test.strictEqual(actual, expected, [message])
+    test.notStrictEqual(actual, expected, [message])
+    test.throws(block, [error], [message])
+    test.doesNotThrow(block, [error], [message])
+    test.ifError(value)
+*/
+
+var fs = require('fs');
+var exec = require('child_process').exec;
+
+var _which = require('which').sync;
+function which(command) {
+  try {
+    _which(command);
+    return command;
+  } catch (err) {
+    return false;
+  }
+}
+
+// Look for grep first (any OS). If not found (but on Windows) look for find,
+// which is Windows' horribly crippled grep alternative.
+var grep = which('grep') || process.platform === 'win32' && which('find');
+
+exports['exit'] = {
+  setUp: function(done) {
+    this.origCwd = process.cwd();
+    process.chdir('test/fixtures');
+    done();
+  },
+  tearDown: function(done) {
+    process.chdir(this.origCwd);
+    done();
+  },
+  'grep': function(test) {
+    test.expect(1);
+    // Many unit tests depend on this.
+    test.ok(grep, 'A suitable "grep" or "find" program was not found in the PATH.');
+    test.done();
+  },
+  // The rest of the tests are built dynamically, to keep things sane.
+};
+
+// A few helper functions.
+function normalizeLineEndings(s) {
+  return s.replace(/\r?\n/g, '\n');
+}
+
+// Capture command output, normalizing captured stdout to unix file endings.
+function run(command, callback) {
+  exec(command, function(error, stdout) {
+    callback(error ? error.code : 0, normalizeLineEndings(stdout));
+  });
+}
+
+// Read a fixture file, normalizing file contents to unix file endings.
+function fixture(filename) {
+  return normalizeLineEndings(String(fs.readFileSync(filename)));
+}
+
+function buildTests() {
+  // Build individual unit tests for command output.
+  var counts = [10, 100, 1000];
+  var outputs = [' stdout stderr', ' stdout', ' stderr'];
+  var pipes = ['', ' | ' + grep + ' "std"'];
+  counts.forEach(function(count) {
+    outputs.forEach(function(output) {
+      pipes.forEach(function(pipe) {
+        var command = 'node log.js 0 ' + count + output + ' 2>&1' + pipe;
+        exports['exit']['output (' + command + ')'] = function(test) {
+          test.expect(2);
+          run(command, function(code, actual) {
+            var expected = fixture(count + output.replace(/ /g, '-') + '.txt');
+            // Sometimes, the actual file lines are out of order on Windows.
+            // But since the point of this lib is to drain the buffer and not
+            // guarantee output order, we only test the length.
+            test.equal(actual.length, expected.length, 'should be the same length.');
+            // The "fail" lines in log.js should NOT be output!
+            test.ok(actual.indexOf('fail') === -1, 'should not output after exit is called.');
+            test.done();
+          });
+        };
+      });
+    });
+  });
+
+  // Build individual unit tests for exit codes.
+  var codes = [0, 1, 123];
+  codes.forEach(function(code) {
+    var command = 'node log.js ' + code + ' 10 stdout stderr';
+    exports['exit']['exit code (' + command + ')'] = function(test) {
+      test.expect(1);
+      run(command, function(actual) {
+        // The specified exit code should be passed through.
+        test.equal(actual, code, 'should exit with ' + code + ' error code.');
+        test.done();
+      });
+    };
+  });
+}
+
+// Don't bother building tests if grep wasn't found, otherwise everything will
+// fail and the error will get lost.
+if (grep) {
+  buildTests();
+}
diff --git a/test/fixtures/10-stderr.txt b/test/fixtures/10-stderr.txt
new file mode 100644
index 0000000..2859200
--- /dev/null
+++ b/test/fixtures/10-stderr.txt
@@ -0,0 +1,10 @@
+stderr 0
+stderr 1
+stderr 2
+stderr 3
+stderr 4
+stderr 5
+stderr 6
+stderr 7
+stderr 8
+stderr 9
diff --git a/test/fixtures/10-stdout-stderr.txt b/test/fixtures/10-stdout-stderr.txt
new file mode 100644
index 0000000..9de8616
--- /dev/null
+++ b/test/fixtures/10-stdout-stderr.txt
@@ -0,0 +1,20 @@
+stdout 0
+stderr 0
+stdout 1
+stdout 2
+stderr 1
+stdout 3
+stderr 2
+stderr 3
+stdout 4
+stderr 4
+stdout 5
+stderr 5
+stdout 6
+stderr 6
+stdout 7
+stderr 7
+stdout 8
+stderr 8
+stdout 9
+stderr 9
diff --git a/test/fixtures/10-stdout.txt b/test/fixtures/10-stdout.txt
new file mode 100644
index 0000000..1ce90dc
--- /dev/null
+++ b/test/fixtures/10-stdout.txt
@@ -0,0 +1,10 @@
+stdout 0
+stdout 1
+stdout 2
+stdout 3
+stdout 4
+stdout 5
+stdout 6
+stdout 7
+stdout 8
+stdout 9
diff --git a/test/fixtures/100-stderr.txt b/test/fixtures/100-stderr.txt
new file mode 100644
index 0000000..3a78c85
--- /dev/null
+++ b/test/fixtures/100-stderr.txt
@@ -0,0 +1,100 @@
+stderr 0
+stderr 1
+stderr 2
+stderr 3
+stderr 4
+stderr 5
+stderr 6
+stderr 7
+stderr 8
+stderr 9
+stderr 10
+stderr 11
+stderr 12
+stderr 13
+stderr 14
+stderr 15
+stderr 16
+stderr 17
+stderr 18
+stderr 19
+stderr 20
+stderr 21
+stderr 22
+stderr 23
+stderr 24
+stderr 25
+stderr 26
+stderr 27
+stderr 28
+stderr 29
+stderr 30
+stderr 31
+stderr 32
+stderr 33
+stderr 34
+stderr 35
+stderr 36
+stderr 37
+stderr 38
+stderr 39
+stderr 40
+stderr 41
+stderr 42
+stderr 43
+stderr 44
+stderr 45
+stderr 46
+stderr 47
+stderr 48
+stderr 49
+stderr 50
+stderr 51
+stderr 52
+stderr 53
+stderr 54
+stderr 55
+stderr 56
+stderr 57
+stderr 58
+stderr 59
+stderr 60
+stderr 61
+stderr 62
+stderr 63
+stderr 64
+stderr 65
+stderr 66
+stderr 67
+stderr 68
+stderr 69
+stderr 70
+stderr 71
+stderr 72
+stderr 73
+stderr 74
+stderr 75
+stderr 76
+stderr 77
+stderr 78
+stderr 79
+stderr 80
+stderr 81
+stderr 82
+stderr 83
+stderr 84
+stderr 85
+stderr 86
+stderr 87
+stderr 88
+stderr 89
+stderr 90
+stderr 91
+stderr 92
+stderr 93
+stderr 94
+stderr 95
+stderr 96
+stderr 97
+stderr 98
+stderr 99
diff --git a/test/fixtures/100-stdout-stderr.txt b/test/fixtures/100-stdout-stderr.txt
new file mode 100644
index 0000000..65f35f4
--- /dev/null
+++ b/test/fixtures/100-stdout-stderr.txt
@@ -0,0 +1,200 @@
+stdout 0
+stderr 0
+stdout 1
+stderr 1
+stdout 2
+stderr 2
+stdout 3
+stderr 3
+stdout 4
+stderr 4
+stdout 5
+stderr 5
+stdout 6
+stderr 6
+stdout 7
+stderr 7
+stdout 8
+stderr 8
+stdout 9
+stderr 9
+stdout 10
+stderr 10
+stdout 11
+stderr 11
+stdout 12
+stderr 12
+stdout 13
+stderr 13
+stdout 14
+stderr 14
+stdout 15
+stderr 15
+stdout 16
+stderr 16
+stdout 17
+stderr 17
+stdout 18
+stderr 18
+stdout 19
+stderr 19
+stdout 20
+stderr 20
+stdout 21
+stderr 21
+stdout 22
+stderr 22
+stdout 23
+stderr 23
+stdout 24
+stderr 24
+stdout 25
+stderr 25
+stdout 26
+stderr 26
+stdout 27
+stderr 27
+stdout 28
+stderr 28
+stdout 29
+stderr 29
+stdout 30
+stderr 30
+stdout 31
+stderr 31
+stdout 32
+stderr 32
+stdout 33
+stderr 33
+stdout 34
+stderr 34
+stdout 35
+stderr 35
+stdout 36
+stderr 36
+stdout 37
+stderr 37
+stdout 38
+stderr 38
+stdout 39
+stderr 39
+stdout 40
+stderr 40
+stdout 41
+stderr 41
+stdout 42
+stderr 42
+stdout 43
+stderr 43
+stdout 44
+stderr 44
+stdout 45
+stderr 45
+stdout 46
+stderr 46
+stdout 47
+stderr 47
+stdout 48
+stderr 48
+stdout 49
+stderr 49
+stdout 50
+stderr 50
+stdout 51
+stderr 51
+stdout 52
+stderr 52
+stdout 53
+stderr 53
+stdout 54
+stderr 54
+stdout 55
+stderr 55
+stdout 56
+stderr 56
+stdout 57
+stderr 57
+stdout 58
+stderr 58
+stdout 59
+stderr 59
+stdout 60
+stderr 60
+stdout 61
+stderr 61
+stdout 62
+stderr 62
+stdout 63
+stderr 63
+stdout 64
+stderr 64
+stdout 65
+stderr 65
+stdout 66
+stderr 66
+stdout 67
+stderr 67
+stdout 68
+stderr 68
+stdout 69
+stderr 69
+stdout 70
+stderr 70
+stdout 71
+stderr 71
+stdout 72
+stderr 72
+stdout 73
+stderr 73
+stdout 74
+stderr 74
+stdout 75
+stderr 75
+stdout 76
+stderr 76
+stdout 77
+stderr 77
+stdout 78
+stderr 78
+stdout 79
+stderr 79
+stdout 80
+stderr 80
+stdout 81
+stderr 81
+stdout 82
+stderr 82
+stdout 83
+stderr 83
+stdout 84
+stderr 84
+stdout 85
+stderr 85
+stdout 86
+stderr 86
+stdout 87
+stderr 87
+stdout 88
+stderr 88
+stdout 89
+stderr 89
+stdout 90
+stderr 90
+stdout 91
+stderr 91
+stdout 92
+stderr 92
+stdout 93
+stderr 93
+stdout 94
+stderr 94
+stdout 95
+stderr 95
+stdout 96
+stderr 96
+stdout 97
+stderr 97
+stdout 98
+stderr 98
+stdout 99
+stderr 99
diff --git a/test/fixtures/100-stdout.txt b/test/fixtures/100-stdout.txt
new file mode 100644
index 0000000..5d9cac2
--- /dev/null
+++ b/test/fixtures/100-stdout.txt
@@ -0,0 +1,100 @@
+stdout 0
+stdout 1
+stdout 2
+stdout 3
+stdout 4
+stdout 5
+stdout 6
+stdout 7
+stdout 8
+stdout 9
+stdout 10
+stdout 11
+stdout 12
+stdout 13
+stdout 14
+stdout 15
+stdout 16
+stdout 17
+stdout 18
+stdout 19
+stdout 20
+stdout 21
+stdout 22
+stdout 23
+stdout 24
+stdout 25
+stdout 26
+stdout 27
+stdout 28
+stdout 29
+stdout 30
+stdout 31
+stdout 32
+stdout 33
+stdout 34
+stdout 35
+stdout 36
+stdout 37
+stdout 38
+stdout 39
+stdout 40
+stdout 41
+stdout 42
+stdout 43
+stdout 44
+stdout 45
+stdout 46
+stdout 47
+stdout 48
+stdout 49
+stdout 50
+stdout 51
+stdout 52
+stdout 53
+stdout 54
+stdout 55
+stdout 56
+stdout 57
+stdout 58
+stdout 59
+stdout 60
+stdout 61
+stdout 62
+stdout 63
+stdout 64
+stdout 65
+stdout 66
+stdout 67
+stdout 68
+stdout 69
+stdout 70
+stdout 71
+stdout 72
+stdout 73
+stdout 74
+stdout 75
+stdout 76
+stdout 77
+stdout 78
+stdout 79
+stdout 80
+stdout 81
+stdout 82
+stdout 83
+stdout 84
+stdout 85
+stdout 86
+stdout 87
+stdout 88
+stdout 89
+stdout 90
+stdout 91
+stdout 92
+stdout 93
+stdout 94
+stdout 95
+stdout 96
+stdout 97
+stdout 98
+stdout 99
diff --git a/test/fixtures/1000-stderr.txt b/test/fixtures/1000-stderr.txt
new file mode 100644
index 0000000..d637510
--- /dev/null
+++ b/test/fixtures/1000-stderr.txt
@@ -0,0 +1,1000 @@
+stderr 0
+stderr 1
+stderr 2
+stderr 3
+stderr 4
+stderr 5
+stderr 6
+stderr 7
+stderr 8
+stderr 9
+stderr 10
+stderr 11
+stderr 12
+stderr 13
+stderr 14
+stderr 15
+stderr 16
+stderr 17
+stderr 18
+stderr 19
+stderr 20
+stderr 21
+stderr 22
+stderr 23
+stderr 24
+stderr 25
+stderr 26
+stderr 27
+stderr 28
+stderr 29
+stderr 30
+stderr 31
+stderr 32
+stderr 33
+stderr 34
+stderr 35
+stderr 36
+stderr 37
+stderr 38
+stderr 39
+stderr 40
+stderr 41
+stderr 42
+stderr 43
+stderr 44
+stderr 45
+stderr 46
+stderr 47
+stderr 48
+stderr 49
+stderr 50
+stderr 51
+stderr 52
+stderr 53
+stderr 54
+stderr 55
+stderr 56
+stderr 57
+stderr 58
+stderr 59
+stderr 60
+stderr 61
+stderr 62
+stderr 63
+stderr 64
+stderr 65
+stderr 66
+stderr 67
+stderr 68
+stderr 69
+stderr 70
+stderr 71
+stderr 72
+stderr 73
+stderr 74
+stderr 75
+stderr 76
+stderr 77
+stderr 78
+stderr 79
+stderr 80
+stderr 81
+stderr 82
+stderr 83
+stderr 84
+stderr 85
+stderr 86
+stderr 87
+stderr 88
+stderr 89
+stderr 90
+stderr 91
+stderr 92
+stderr 93
+stderr 94
+stderr 95
+stderr 96
+stderr 97
+stderr 98
+stderr 99
+stderr 100
+stderr 101
+stderr 102
+stderr 103
+stderr 104
+stderr 105
+stderr 106
+stderr 107
+stderr 108
+stderr 109
+stderr 110
+stderr 111
+stderr 112
+stderr 113
+stderr 114
+stderr 115
+stderr 116
+stderr 117
+stderr 118
+stderr 119
+stderr 120
+stderr 121
+stderr 122
+stderr 123
+stderr 124
+stderr 125
+stderr 126
+stderr 127
+stderr 128
+stderr 129
+stderr 130
+stderr 131
+stderr 132
+stderr 133
+stderr 134
+stderr 135
+stderr 136
+stderr 137
+stderr 138
+stderr 139
+stderr 140
+stderr 141
+stderr 142
+stderr 143
+stderr 144
+stderr 145
+stderr 146
+stderr 147
+stderr 148
+stderr 149
+stderr 150
+stderr 151
+stderr 152
+stderr 153
+stderr 154
+stderr 155
+stderr 156
+stderr 157
+stderr 158
+stderr 159
+stderr 160
+stderr 161
+stderr 162
+stderr 163
+stderr 164
+stderr 165
+stderr 166
+stderr 167
+stderr 168
+stderr 169
+stderr 170
+stderr 171
+stderr 172
+stderr 173
+stderr 174
+stderr 175
+stderr 176
+stderr 177
+stderr 178
+stderr 179
+stderr 180
+stderr 181
+stderr 182
+stderr 183
+stderr 184
+stderr 185
+stderr 186
+stderr 187
+stderr 188
+stderr 189
+stderr 190
+stderr 191
+stderr 192
+stderr 193
+stderr 194
+stderr 195
+stderr 196
+stderr 197
+stderr 198
+stderr 199
+stderr 200
+stderr 201
+stderr 202
+stderr 203
+stderr 204
+stderr 205
+stderr 206
+stderr 207
+stderr 208
+stderr 209
+stderr 210
+stderr 211
+stderr 212
+stderr 213
+stderr 214
+stderr 215
+stderr 216
+stderr 217
+stderr 218
+stderr 219
+stderr 220
+stderr 221
+stderr 222
+stderr 223
+stderr 224
+stderr 225
+stderr 226
+stderr 227
+stderr 228
+stderr 229
+stderr 230
+stderr 231
+stderr 232
+stderr 233
+stderr 234
+stderr 235
+stderr 236
+stderr 237
+stderr 238
+stderr 239
+stderr 240
+stderr 241
+stderr 242
+stderr 243
+stderr 244
+stderr 245
+stderr 246
+stderr 247
+stderr 248
+stderr 249
+stderr 250
+stderr 251
+stderr 252
+stderr 253
+stderr 254
+stderr 255
+stderr 256
+stderr 257
+stderr 258
+stderr 259
+stderr 260
+stderr 261
+stderr 262
+stderr 263
+stderr 264
+stderr 265
+stderr 266
+stderr 267
+stderr 268
+stderr 269
+stderr 270
+stderr 271
+stderr 272
+stderr 273
+stderr 274
+stderr 275
+stderr 276
+stderr 277
+stderr 278
+stderr 279
+stderr 280
+stderr 281
+stderr 282
+stderr 283
+stderr 284
+stderr 285
+stderr 286
+stderr 287
+stderr 288
+stderr 289
+stderr 290
+stderr 291
+stderr 292
+stderr 293
+stderr 294
+stderr 295
+stderr 296
+stderr 297
+stderr 298
+stderr 299
+stderr 300
+stderr 301
+stderr 302
+stderr 303
+stderr 304
+stderr 305
+stderr 306
+stderr 307
+stderr 308
+stderr 309
+stderr 310
+stderr 311
+stderr 312
+stderr 313
+stderr 314
+stderr 315
+stderr 316
+stderr 317
+stderr 318
+stderr 319
+stderr 320
+stderr 321
+stderr 322
+stderr 323
+stderr 324
+stderr 325
+stderr 326
+stderr 327
+stderr 328
+stderr 329
+stderr 330
+stderr 331
+stderr 332
+stderr 333
+stderr 334
+stderr 335
+stderr 336
+stderr 337
+stderr 338
+stderr 339
+stderr 340
+stderr 341
+stderr 342
+stderr 343
+stderr 344
+stderr 345
+stderr 346
+stderr 347
+stderr 348
+stderr 349
+stderr 350
+stderr 351
+stderr 352
+stderr 353
+stderr 354
+stderr 355
+stderr 356
+stderr 357
+stderr 358
+stderr 359
+stderr 360
+stderr 361
+stderr 362
+stderr 363
+stderr 364
+stderr 365
+stderr 366
+stderr 367
+stderr 368
+stderr 369
+stderr 370
+stderr 371
+stderr 372
+stderr 373
+stderr 374
+stderr 375
+stderr 376
+stderr 377
+stderr 378
+stderr 379
+stderr 380
+stderr 381
+stderr 382
+stderr 383
+stderr 384
+stderr 385
+stderr 386
+stderr 387
+stderr 388
+stderr 389
+stderr 390
+stderr 391
+stderr 392
+stderr 393
+stderr 394
+stderr 395
+stderr 396
+stderr 397
+stderr 398
+stderr 399
+stderr 400
+stderr 401
+stderr 402
+stderr 403
+stderr 404
+stderr 405
+stderr 406
+stderr 407
+stderr 408
+stderr 409
+stderr 410
+stderr 411
+stderr 412
+stderr 413
+stderr 414
+stderr 415
+stderr 416
+stderr 417
+stderr 418
+stderr 419
+stderr 420
+stderr 421
+stderr 422
+stderr 423
+stderr 424
+stderr 425
+stderr 426
+stderr 427
+stderr 428
+stderr 429
+stderr 430
+stderr 431
+stderr 432
+stderr 433
+stderr 434
+stderr 435
+stderr 436
+stderr 437
+stderr 438
+stderr 439
+stderr 440
+stderr 441
+stderr 442
+stderr 443
+stderr 444
+stderr 445
+stderr 446
+stderr 447
+stderr 448
+stderr 449
+stderr 450
+stderr 451
+stderr 452
+stderr 453
+stderr 454
+stderr 455
+stderr 456
+stderr 457
+stderr 458
+stderr 459
+stderr 460
+stderr 461
+stderr 462
+stderr 463
+stderr 464
+stderr 465
+stderr 466
+stderr 467
+stderr 468
+stderr 469
+stderr 470
+stderr 471
+stderr 472
+stderr 473
+stderr 474
+stderr 475
+stderr 476
+stderr 477
+stderr 478
+stderr 479
+stderr 480
+stderr 481
+stderr 482
+stderr 483
+stderr 484
+stderr 485
+stderr 486
+stderr 487
+stderr 488
+stderr 489
+stderr 490
+stderr 491
+stderr 492
+stderr 493
+stderr 494
+stderr 495
+stderr 496
+stderr 497
+stderr 498
+stderr 499
+stderr 500
+stderr 501
+stderr 502
+stderr 503
+stderr 504
+stderr 505
+stderr 506
+stderr 507
+stderr 508
+stderr 509
+stderr 510
+stderr 511
+stderr 512
+stderr 513
+stderr 514
+stderr 515
+stderr 516
+stderr 517
+stderr 518
+stderr 519
+stderr 520
+stderr 521
+stderr 522
+stderr 523
+stderr 524
+stderr 525
+stderr 526
+stderr 527
+stderr 528
+stderr 529
+stderr 530
+stderr 531
+stderr 532
+stderr 533
+stderr 534
+stderr 535
+stderr 536
+stderr 537
+stderr 538
+stderr 539
+stderr 540
+stderr 541
+stderr 542
+stderr 543
+stderr 544
+stderr 545
+stderr 546
+stderr 547
+stderr 548
+stderr 549
+stderr 550
+stderr 551
+stderr 552
+stderr 553
+stderr 554
+stderr 555
+stderr 556
+stderr 557
+stderr 558
+stderr 559
+stderr 560
+stderr 561
+stderr 562
+stderr 563
+stderr 564
+stderr 565
+stderr 566
+stderr 567
+stderr 568
+stderr 569
+stderr 570
+stderr 571
+stderr 572
+stderr 573
+stderr 574
+stderr 575
+stderr 576
+stderr 577
+stderr 578
+stderr 579
+stderr 580
+stderr 581
+stderr 582
+stderr 583
+stderr 584
+stderr 585
+stderr 586
+stderr 587
+stderr 588
+stderr 589
+stderr 590
+stderr 591
+stderr 592
+stderr 593
+stderr 594
+stderr 595
+stderr 596
+stderr 597
+stderr 598
+stderr 599
+stderr 600
+stderr 601
+stderr 602
+stderr 603
+stderr 604
+stderr 605
+stderr 606
+stderr 607
+stderr 608
+stderr 609
+stderr 610
+stderr 611
+stderr 612
+stderr 613
+stderr 614
+stderr 615
+stderr 616
+stderr 617
+stderr 618
+stderr 619
+stderr 620
+stderr 621
+stderr 622
+stderr 623
+stderr 624
+stderr 625
+stderr 626
+stderr 627
+stderr 628
+stderr 629
+stderr 630
+stderr 631
+stderr 632
+stderr 633
+stderr 634
+stderr 635
+stderr 636
+stderr 637
+stderr 638
+stderr 639
+stderr 640
+stderr 641
+stderr 642
+stderr 643
+stderr 644
+stderr 645
+stderr 646
+stderr 647
+stderr 648
+stderr 649
+stderr 650
+stderr 651
+stderr 652
+stderr 653
+stderr 654
+stderr 655
+stderr 656
+stderr 657
+stderr 658
+stderr 659
+stderr 660
+stderr 661
+stderr 662
+stderr 663
+stderr 664
+stderr 665
+stderr 666
+stderr 667
+stderr 668
+stderr 669
+stderr 670
+stderr 671
+stderr 672
+stderr 673
+stderr 674
+stderr 675
+stderr 676
+stderr 677
+stderr 678
+stderr 679
+stderr 680
+stderr 681
+stderr 682
+stderr 683
+stderr 684
+stderr 685
+stderr 686
+stderr 687
+stderr 688
+stderr 689
+stderr 690
+stderr 691
+stderr 692
+stderr 693
+stderr 694
+stderr 695
+stderr 696
+stderr 697
+stderr 698
+stderr 699
+stderr 700
+stderr 701
+stderr 702
+stderr 703
+stderr 704
+stderr 705
+stderr 706
+stderr 707
+stderr 708
+stderr 709
+stderr 710
+stderr 711
+stderr 712
+stderr 713
+stderr 714
+stderr 715
+stderr 716
+stderr 717
+stderr 718
+stderr 719
+stderr 720
+stderr 721
+stderr 722
+stderr 723
+stderr 724
+stderr 725
+stderr 726
+stderr 727
+stderr 728
+stderr 729
+stderr 730
+stderr 731
+stderr 732
+stderr 733
+stderr 734
+stderr 735
+stderr 736
+stderr 737
+stderr 738
+stderr 739
+stderr 740
+stderr 741
+stderr 742
+stderr 743
+stderr 744
+stderr 745
+stderr 746
+stderr 747
+stderr 748
+stderr 749
+stderr 750
+stderr 751
+stderr 752
+stderr 753
+stderr 754
+stderr 755
+stderr 756
+stderr 757
+stderr 758
+stderr 759
+stderr 760
+stderr 761
+stderr 762
+stderr 763
+stderr 764
+stderr 765
+stderr 766
+stderr 767
+stderr 768
+stderr 769
+stderr 770
+stderr 771
+stderr 772
+stderr 773
+stderr 774
+stderr 775
+stderr 776
+stderr 777
+stderr 778
+stderr 779
+stderr 780
+stderr 781
+stderr 782
+stderr 783
+stderr 784
+stderr 785
+stderr 786
+stderr 787
+stderr 788
+stderr 789
+stderr 790
+stderr 791
+stderr 792
+stderr 793
+stderr 794
+stderr 795
+stderr 796
+stderr 797
+stderr 798
+stderr 799
+stderr 800
+stderr 801
+stderr 802
+stderr 803
+stderr 804
+stderr 805
+stderr 806
+stderr 807
+stderr 808
+stderr 809
+stderr 810
+stderr 811
+stderr 812
+stderr 813
+stderr 814
+stderr 815
+stderr 816
+stderr 817
+stderr 818
+stderr 819
+stderr 820
+stderr 821
+stderr 822
+stderr 823
+stderr 824
+stderr 825
+stderr 826
+stderr 827
+stderr 828
+stderr 829
+stderr 830
+stderr 831
+stderr 832
+stderr 833
+stderr 834
+stderr 835
+stderr 836
+stderr 837
+stderr 838
+stderr 839
+stderr 840
+stderr 841
+stderr 842
+stderr 843
+stderr 844
+stderr 845
+stderr 846
+stderr 847
+stderr 848
+stderr 849
+stderr 850
+stderr 851
+stderr 852
+stderr 853
+stderr 854
+stderr 855
+stderr 856
+stderr 857
+stderr 858
+stderr 859
+stderr 860
+stderr 861
+stderr 862
+stderr 863
+stderr 864
+stderr 865
+stderr 866
+stderr 867
+stderr 868
+stderr 869
+stderr 870
+stderr 871
+stderr 872
+stderr 873
+stderr 874
+stderr 875
+stderr 876
+stderr 877
+stderr 878
+stderr 879
+stderr 880
+stderr 881
+stderr 882
+stderr 883
+stderr 884
+stderr 885
+stderr 886
+stderr 887
+stderr 888
+stderr 889
+stderr 890
+stderr 891
+stderr 892
+stderr 893
+stderr 894
+stderr 895
+stderr 896
+stderr 897
+stderr 898
+stderr 899
+stderr 900
+stderr 901
+stderr 902
+stderr 903
+stderr 904
+stderr 905
+stderr 906
+stderr 907
+stderr 908
+stderr 909
+stderr 910
+stderr 911
+stderr 912
+stderr 913
+stderr 914
+stderr 915
+stderr 916
+stderr 917
+stderr 918
+stderr 919
+stderr 920
+stderr 921
+stderr 922
+stderr 923
+stderr 924
+stderr 925
+stderr 926
+stderr 927
+stderr 928
+stderr 929
+stderr 930
+stderr 931
+stderr 932
+stderr 933
+stderr 934
+stderr 935
+stderr 936
+stderr 937
+stderr 938
+stderr 939
+stderr 940
+stderr 941
+stderr 942
+stderr 943
+stderr 944
+stderr 945
+stderr 946
+stderr 947
+stderr 948
+stderr 949
+stderr 950
+stderr 951
+stderr 952
+stderr 953
+stderr 954
+stderr 955
+stderr 956
+stderr 957
+stderr 958
+stderr 959
+stderr 960
+stderr 961
+stderr 962
+stderr 963
+stderr 964
+stderr 965
+stderr 966
+stderr 967
+stderr 968
+stderr 969
+stderr 970
+stderr 971
+stderr 972
+stderr 973
+stderr 974
+stderr 975
+stderr 976
+stderr 977
+stderr 978
+stderr 979
+stderr 980
+stderr 981
+stderr 982
+stderr 983
+stderr 984
+stderr 985
+stderr 986
+stderr 987
+stderr 988
+stderr 989
+stderr 990
+stderr 991
+stderr 992
+stderr 993
+stderr 994
+stderr 995
+stderr 996
+stderr 997
+stderr 998
+stderr 999
diff --git a/test/fixtures/1000-stdout-stderr.txt b/test/fixtures/1000-stdout-stderr.txt
new file mode 100644
index 0000000..4fde2b4
--- /dev/null
+++ b/test/fixtures/1000-stdout-stderr.txt
@@ -0,0 +1,2000 @@
+stdout 0
+stderr 0
+stdout 1
+stderr 1
+stdout 2
+stderr 2
+stdout 3
+stderr 3
+stdout 4
+stderr 4
+stdout 5
+stderr 5
+stdout 6
+stderr 6
+stdout 7
+stderr 7
+stdout 8
+stderr 8
+stdout 9
+stderr 9
+stdout 10
+stderr 10
+stdout 11
+stderr 11
+stdout 12
+stderr 12
+stdout 13
+stderr 13
+stdout 14
+stderr 14
+stdout 15
+stderr 15
+stdout 16
+stderr 16
+stdout 17
+stderr 17
+stdout 18
+stderr 18
+stdout 19
+stderr 19
+stdout 20
+stderr 20
+stdout 21
+stderr 21
+stdout 22
+stderr 22
+stdout 23
+stderr 23
+stdout 24
+stderr 24
+stdout 25
+stderr 25
+stdout 26
+stderr 26
+stdout 27
+stderr 27
+stdout 28
+stderr 28
+stdout 29
+stderr 29
+stdout 30
+stderr 30
+stdout 31
+stderr 31
+stdout 32
+stderr 32
+stdout 33
+stderr 33
+stdout 34
+stderr 34
+stdout 35
+stderr 35
+stdout 36
+stderr 36
+stdout 37
+stderr 37
+stdout 38
+stderr 38
+stdout 39
+stderr 39
+stdout 40
+stderr 40
+stdout 41
+stderr 41
+stdout 42
+stderr 42
+stdout 43
+stderr 43
+stdout 44
+stderr 44
+stdout 45
+stderr 45
+stdout 46
+stderr 46
+stdout 47
+stderr 47
+stdout 48
+stderr 48
+stdout 49
+stderr 49
+stdout 50
+stderr 50
+stdout 51
+stderr 51
+stdout 52
+stderr 52
+stdout 53
+stderr 53
+stdout 54
+stderr 54
+stdout 55
+stderr 55
+stdout 56
+stderr 56
+stdout 57
+stderr 57
+stdout 58
+stderr 58
+stdout 59
+stderr 59
+stdout 60
+stderr 60
+stdout 61
+stderr 61
+stdout 62
+stderr 62
+stdout 63
+stderr 63
+stdout 64
+stderr 64
+stdout 65
+stderr 65
+stdout 66
+stderr 66
+stdout 67
+stderr 67
+stdout 68
+stderr 68
+stdout 69
+stderr 69
+stdout 70
+stderr 70
+stdout 71
+stderr 71
+stdout 72
+stderr 72
+stdout 73
+stderr 73
+stdout 74
+stderr 74
+stdout 75
+stderr 75
+stdout 76
+stderr 76
+stdout 77
+stderr 77
+stdout 78
+stderr 78
+stdout 79
+stderr 79
+stdout 80
+stderr 80
+stdout 81
+stderr 81
+stdout 82
+stderr 82
+stdout 83
+stderr 83
+stdout 84
+stderr 84
+stdout 85
+stderr 85
+stdout 86
+stderr 86
+stdout 87
+stderr 87
+stdout 88
+stderr 88
+stdout 89
+stderr 89
+stdout 90
+stderr 90
+stdout 91
+stderr 91
+stdout 92
+stderr 92
+stdout 93
+stderr 93
+stdout 94
+stderr 94
+stdout 95
+stderr 95
+stdout 96
+stderr 96
+stdout 97
+stderr 97
+stdout 98
+stderr 98
+stdout 99
+stderr 99
+stdout 100
+stderr 100
+stdout 101
+stderr 101
+stdout 102
+stderr 102
+stdout 103
+stderr 103
+stdout 104
+stderr 104
+stdout 105
+stderr 105
+stdout 106
+stderr 106
+stdout 107
+stderr 107
+stdout 108
+stderr 108
+stdout 109
+stderr 109
+stdout 110
+stderr 110
+stdout 111
+stderr 111
+stdout 112
+stderr 112
+stdout 113
+stderr 113
+stdout 114
+stderr 114
+stdout 115
+stderr 115
+stdout 116
+stderr 116
+stdout 117
+stderr 117
+stdout 118
+stderr 118
+stdout 119
+stderr 119
+stdout 120
+stderr 120
+stdout 121
+stderr 121
+stdout 122
+stderr 122
+stdout 123
+stderr 123
+stdout 124
+stderr 124
+stdout 125
+stderr 125
+stdout 126
+stderr 126
+stdout 127
+stderr 127
+stdout 128
+stderr 128
+stdout 129
+stderr 129
+stdout 130
+stderr 130
+stdout 131
+stderr 131
+stdout 132
+stderr 132
+stdout 133
+stderr 133
+stdout 134
+stderr 134
+stdout 135
+stderr 135
+stdout 136
+stderr 136
+stdout 137
+stderr 137
+stdout 138
+stderr 138
+stdout 139
+stderr 139
+stdout 140
+stderr 140
+stdout 141
+stderr 141
+stdout 142
+stderr 142
+stdout 143
+stderr 143
+stdout 144
+stderr 144
+stdout 145
+stderr 145
+stdout 146
+stderr 146
+stdout 147
+stderr 147
+stdout 148
+stderr 148
+stdout 149
+stderr 149
+stdout 150
+stderr 150
+stdout 151
+stderr 151
+stdout 152
+stderr 152
+stdout 153
+stderr 153
+stdout 154
+stderr 154
+stdout 155
+stderr 155
+stdout 156
+stderr 156
+stdout 157
+stderr 157
+stdout 158
+stderr 158
+stdout 159
+stderr 159
+stdout 160
+stderr 160
+stdout 161
+stderr 161
+stdout 162
+stderr 162
+stdout 163
+stderr 163
+stdout 164
+stderr 164
+stdout 165
+stderr 165
+stdout 166
+stderr 166
+stdout 167
+stderr 167
+stdout 168
+stderr 168
+stdout 169
+stderr 169
+stdout 170
+stderr 170
+stdout 171
+stderr 171
+stdout 172
+stderr 172
+stdout 173
+stderr 173
+stdout 174
+stderr 174
+stdout 175
+stderr 175
+stdout 176
+stderr 176
+stdout 177
+stderr 177
+stdout 178
+stderr 178
+stdout 179
+stderr 179
+stdout 180
+stderr 180
+stdout 181
+stderr 181
+stdout 182
+stderr 182
+stdout 183
+stderr 183
+stdout 184
+stderr 184
+stdout 185
+stderr 185
+stdout 186
+stderr 186
+stdout 187
+stderr 187
+stdout 188
+stderr 188
+stdout 189
+stderr 189
+stdout 190
+stderr 190
+stdout 191
+stderr 191
+stdout 192
+stderr 192
+stdout 193
+stderr 193
+stdout 194
+stderr 194
+stdout 195
+stderr 195
+stdout 196
+stderr 196
+stdout 197
+stderr 197
+stdout 198
+stderr 198
+stdout 199
+stderr 199
+stdout 200
+stderr 200
+stdout 201
+stderr 201
+stdout 202
+stderr 202
+stdout 203
+stderr 203
+stdout 204
+stderr 204
+stdout 205
+stderr 205
+stdout 206
+stderr 206
+stdout 207
+stderr 207
+stdout 208
+stderr 208
+stdout 209
+stderr 209
+stdout 210
+stderr 210
+stdout 211
+stderr 211
+stdout 212
+stderr 212
+stdout 213
+stderr 213
+stdout 214
+stderr 214
+stdout 215
+stderr 215
+stdout 216
+stderr 216
+stdout 217
+stderr 217
+stdout 218
+stderr 218
+stdout 219
+stderr 219
+stdout 220
+stderr 220
+stdout 221
+stderr 221
+stdout 222
+stderr 222
+stdout 223
+stderr 223
+stdout 224
+stderr 224
+stdout 225
+stderr 225
+stdout 226
+stderr 226
+stdout 227
+stderr 227
+stdout 228
+stderr 228
+stdout 229
+stderr 229
+stdout 230
+stderr 230
+stdout 231
+stderr 231
+stdout 232
+stderr 232
+stdout 233
+stderr 233
+stdout 234
+stderr 234
+stdout 235
+stderr 235
+stdout 236
+stderr 236
+stdout 237
+stderr 237
+stdout 238
+stderr 238
+stdout 239
+stderr 239
+stdout 240
+stderr 240
+stdout 241
+stderr 241
+stdout 242
+stderr 242
+stdout 243
+stderr 243
+stdout 244
+stderr 244
+stdout 245
+stderr 245
+stdout 246
+stderr 246
+stdout 247
+stderr 247
+stdout 248
+stderr 248
+stdout 249
+stderr 249
+stdout 250
+stderr 250
+stdout 251
+stderr 251
+stdout 252
+stderr 252
+stdout 253
+stderr 253
+stdout 254
+stderr 254
+stdout 255
+stderr 255
+stdout 256
+stderr 256
+stdout 257
+stderr 257
+stdout 258
+stderr 258
+stdout 259
+stderr 259
+stdout 260
+stderr 260
+stdout 261
+stderr 261
+stdout 262
+stderr 262
+stdout 263
+stderr 263
+stdout 264
+stderr 264
+stdout 265
+stderr 265
+stdout 266
+stderr 266
+stdout 267
+stderr 267
+stdout 268
+stderr 268
+stdout 269
+stderr 269
+stdout 270
+stderr 270
+stdout 271
+stderr 271
+stdout 272
+stderr 272
+stdout 273
+stderr 273
+stdout 274
+stderr 274
+stdout 275
+stderr 275
+stdout 276
+stderr 276
+stdout 277
+stderr 277
+stdout 278
+stderr 278
+stdout 279
+stderr 279
+stdout 280
+stderr 280
+stdout 281
+stderr 281
+stdout 282
+stderr 282
+stdout 283
+stderr 283
+stdout 284
+stderr 284
+stdout 285
+stderr 285
+stdout 286
+stderr 286
+stdout 287
+stderr 287
+stdout 288
+stderr 288
+stdout 289
+stderr 289
+stdout 290
+stderr 290
+stdout 291
+stderr 291
+stdout 292
+stderr 292
+stdout 293
+stderr 293
+stdout 294
+stderr 294
+stdout 295
+stderr 295
+stdout 296
+stderr 296
+stdout 297
+stderr 297
+stdout 298
+stderr 298
+stdout 299
+stderr 299
+stdout 300
+stderr 300
+stdout 301
+stderr 301
+stdout 302
+stderr 302
+stdout 303
+stderr 303
+stdout 304
+stderr 304
+stdout 305
+stderr 305
+stdout 306
+stderr 306
+stdout 307
+stderr 307
+stdout 308
+stderr 308
+stdout 309
+stderr 309
+stdout 310
+stderr 310
+stdout 311
+stderr 311
+stdout 312
+stderr 312
+stdout 313
+stderr 313
+stdout 314
+stderr 314
+stdout 315
+stderr 315
+stdout 316
+stderr 316
+stdout 317
+stderr 317
+stdout 318
+stderr 318
+stdout 319
+stderr 319
+stdout 320
+stderr 320
+stdout 321
+stderr 321
+stdout 322
+stderr 322
+stdout 323
+stderr 323
+stdout 324
+stderr 324
+stdout 325
+stderr 325
+stdout 326
+stderr 326
+stdout 327
+stderr 327
+stdout 328
+stderr 328
+stdout 329
+stderr 329
+stdout 330
+stderr 330
+stdout 331
+stderr 331
+stdout 332
+stderr 332
+stdout 333
+stderr 333
+stdout 334
+stderr 334
+stdout 335
+stderr 335
+stdout 336
+stderr 336
+stdout 337
+stderr 337
+stdout 338
+stderr 338
+stdout 339
+stderr 339
+stdout 340
+stderr 340
+stdout 341
+stderr 341
+stdout 342
+stderr 342
+stdout 343
+stderr 343
+stdout 344
+stderr 344
+stdout 345
+stderr 345
+stdout 346
+stderr 346
+stdout 347
+stderr 347
+stdout 348
+stderr 348
+stdout 349
+stderr 349
+stdout 350
+stderr 350
+stdout 351
+stderr 351
+stdout 352
+stderr 352
+stdout 353
+stderr 353
+stdout 354
+stderr 354
+stdout 355
+stderr 355
+stdout 356
+stderr 356
+stdout 357
+stderr 357
+stdout 358
+stderr 358
+stdout 359
+stderr 359
+stdout 360
+stderr 360
+stdout 361
+stderr 361
+stdout 362
+stderr 362
+stdout 363
+stderr 363
+stdout 364
+stderr 364
+stdout 365
+stderr 365
+stdout 366
+stderr 366
+stdout 367
+stderr 367
+stdout 368
+stderr 368
+stdout 369
+stderr 369
+stdout 370
+stderr 370
+stdout 371
+stderr 371
+stdout 372
+stderr 372
+stdout 373
+stderr 373
+stdout 374
+stderr 374
+stdout 375
+stderr 375
+stdout 376
+stderr 376
+stdout 377
+stderr 377
+stdout 378
+stderr 378
+stdout 379
+stderr 379
+stdout 380
+stderr 380
+stdout 381
+stderr 381
+stdout 382
+stderr 382
+stdout 383
+stderr 383
+stdout 384
+stderr 384
+stdout 385
+stderr 385
+stdout 386
+stderr 386
+stdout 387
+stderr 387
+stdout 388
+stderr 388
+stdout 389
+stderr 389
+stdout 390
+stderr 390
+stdout 391
+stderr 391
+stdout 392
+stderr 392
+stdout 393
+stderr 393
+stdout 394
+stderr 394
+stdout 395
+stderr 395
+stdout 396
+stderr 396
+stdout 397
+stderr 397
+stdout 398
+stderr 398
+stdout 399
+stderr 399
+stdout 400
+stderr 400
+stdout 401
+stderr 401
+stdout 402
+stderr 402
+stdout 403
+stderr 403
+stdout 404
+stderr 404
+stdout 405
+stderr 405
+stdout 406
+stderr 406
+stdout 407
+stderr 407
+stdout 408
+stderr 408
+stdout 409
+stderr 409
+stdout 410
+stderr 410
+stdout 411
+stderr 411
+stdout 412
+stderr 412
+stdout 413
+stderr 413
+stdout 414
+stderr 414
+stdout 415
+stderr 415
+stdout 416
+stderr 416
+stdout 417
+stderr 417
+stdout 418
+stderr 418
+stdout 419
+stderr 419
+stdout 420
+stderr 420
+stdout 421
+stderr 421
+stdout 422
+stderr 422
+stdout 423
+stderr 423
+stdout 424
+stderr 424
+stdout 425
+stderr 425
+stdout 426
+stderr 426
+stdout 427
+stderr 427
+stdout 428
+stderr 428
+stdout 429
+stderr 429
+stdout 430
+stderr 430
+stdout 431
+stderr 431
+stdout 432
+stderr 432
+stdout 433
+stderr 433
+stdout 434
+stderr 434
+stdout 435
+stderr 435
+stdout 436
+stderr 436
+stdout 437
+stderr 437
+stdout 438
+stderr 438
+stdout 439
+stderr 439
+stdout 440
+stderr 440
+stdout 441
+stderr 441
+stdout 442
+stderr 442
+stdout 443
+stderr 443
+stdout 444
+stderr 444
+stdout 445
+stderr 445
+stdout 446
+stderr 446
+stdout 447
+stderr 447
+stdout 448
+stderr 448
+stdout 449
+stderr 449
+stdout 450
+stderr 450
+stdout 451
+stderr 451
+stdout 452
+stderr 452
+stdout 453
+stderr 453
+stdout 454
+stderr 454
+stdout 455
+stderr 455
+stdout 456
+stderr 456
+stdout 457
+stderr 457
+stdout 458
+stderr 458
+stdout 459
+stderr 459
+stdout 460
+stderr 460
+stdout 461
+stderr 461
+stdout 462
+stderr 462
+stdout 463
+stderr 463
+stdout 464
+stderr 464
+stdout 465
+stderr 465
+stdout 466
+stderr 466
+stdout 467
+stderr 467
+stdout 468
+stderr 468
+stdout 469
+stderr 469
+stdout 470
+stderr 470
+stdout 471
+stderr 471
+stdout 472
+stderr 472
+stdout 473
+stderr 473
+stdout 474
+stderr 474
+stdout 475
+stderr 475
+stdout 476
+stderr 476
+stdout 477
+stderr 477
+stdout 478
+stderr 478
+stdout 479
+stderr 479
+stdout 480
+stderr 480
+stdout 481
+stderr 481
+stdout 482
+stderr 482
+stdout 483
+stderr 483
+stdout 484
+stderr 484
+stdout 485
+stderr 485
+stdout 486
+stderr 486
+stdout 487
+stderr 487
+stdout 488
+stderr 488
+stdout 489
+stderr 489
+stdout 490
+stderr 490
+stdout 491
+stderr 491
+stdout 492
+stderr 492
+stdout 493
+stderr 493
+stdout 494
+stderr 494
+stdout 495
+stderr 495
+stdout 496
+stderr 496
+stdout 497
+stderr 497
+stdout 498
+stderr 498
+stdout 499
+stderr 499
+stdout 500
+stderr 500
+stdout 501
+stderr 501
+stdout 502
+stderr 502
+stdout 503
+stderr 503
+stdout 504
+stderr 504
+stdout 505
+stderr 505
+stdout 506
+stderr 506
+stdout 507
+stderr 507
+stdout 508
+stderr 508
+stdout 509
+stderr 509
+stdout 510
+stderr 510
+stdout 511
+stderr 511
+stdout 512
+stderr 512
+stdout 513
+stderr 513
+stdout 514
+stderr 514
+stdout 515
+stderr 515
+stdout 516
+stderr 516
+stdout 517
+stderr 517
+stdout 518
+stderr 518
+stdout 519
+stderr 519
+stdout 520
+stderr 520
+stdout 521
+stderr 521
+stdout 522
+stderr 522
+stdout 523
+stderr 523
+stdout 524
+stderr 524
+stdout 525
+stderr 525
+stdout 526
+stderr 526
+stdout 527
+stderr 527
+stdout 528
+stderr 528
+stdout 529
+stderr 529
+stdout 530
+stderr 530
+stdout 531
+stderr 531
+stdout 532
+stderr 532
+stdout 533
+stderr 533
+stdout 534
+stderr 534
+stdout 535
+stderr 535
+stdout 536
+stderr 536
+stdout 537
+stderr 537
+stdout 538
+stderr 538
+stdout 539
+stderr 539
+stdout 540
+stderr 540
+stdout 541
+stderr 541
+stdout 542
+stderr 542
+stdout 543
+stderr 543
+stdout 544
+stderr 544
+stdout 545
+stderr 545
+stdout 546
+stderr 546
+stdout 547
+stderr 547
+stdout 548
+stderr 548
+stdout 549
+stderr 549
+stdout 550
+stderr 550
+stdout 551
+stderr 551
+stdout 552
+stderr 552
+stdout 553
+stderr 553
+stdout 554
+stderr 554
+stdout 555
+stderr 555
+stdout 556
+stderr 556
+stdout 557
+stderr 557
+stdout 558
+stderr 558
+stdout 559
+stderr 559
+stdout 560
+stderr 560
+stdout 561
+stderr 561
+stdout 562
+stderr 562
+stdout 563
+stderr 563
+stdout 564
+stderr 564
+stdout 565
+stderr 565
+stdout 566
+stderr 566
+stdout 567
+stderr 567
+stdout 568
+stderr 568
+stdout 569
+stderr 569
+stdout 570
+stderr 570
+stdout 571
+stderr 571
+stdout 572
+stderr 572
+stdout 573
+stderr 573
+stdout 574
+stderr 574
+stdout 575
+stderr 575
+stdout 576
+stderr 576
+stdout 577
+stderr 577
+stdout 578
+stderr 578
+stdout 579
+stderr 579
+stdout 580
+stderr 580
+stdout 581
+stderr 581
+stdout 582
+stderr 582
+stdout 583
+stderr 583
+stdout 584
+stderr 584
+stdout 585
+stderr 585
+stdout 586
+stderr 586
+stdout 587
+stderr 587
+stdout 588
+stderr 588
+stdout 589
+stderr 589
+stdout 590
+stderr 590
+stdout 591
+stderr 591
+stdout 592
+stderr 592
+stdout 593
+stderr 593
+stdout 594
+stderr 594
+stdout 595
+stderr 595
+stdout 596
+stderr 596
+stdout 597
+stderr 597
+stdout 598
+stderr 598
+stdout 599
+stderr 599
+stdout 600
+stderr 600
+stdout 601
+stderr 601
+stdout 602
+stderr 602
+stdout 603
+stderr 603
+stdout 604
+stderr 604
+stdout 605
+stderr 605
+stdout 606
+stderr 606
+stdout 607
+stderr 607
+stdout 608
+stderr 608
+stdout 609
+stderr 609
+stdout 610
+stderr 610
+stdout 611
+stderr 611
+stdout 612
+stderr 612
+stdout 613
+stderr 613
+stdout 614
+stderr 614
+stdout 615
+stderr 615
+stdout 616
+stderr 616
+stdout 617
+stderr 617
+stdout 618
+stderr 618
+stdout 619
+stderr 619
+stdout 620
+stderr 620
+stdout 621
+stderr 621
+stdout 622
+stderr 622
+stdout 623
+stderr 623
+stdout 624
+stderr 624
+stdout 625
+stderr 625
+stdout 626
+stderr 626
+stdout 627
+stderr 627
+stdout 628
+stderr 628
+stdout 629
+stderr 629
+stdout 630
+stderr 630
+stdout 631
+stderr 631
+stdout 632
+stderr 632
+stdout 633
+stderr 633
+stdout 634
+stderr 634
+stdout 635
+stderr 635
+stdout 636
+stderr 636
+stdout 637
+stderr 637
+stdout 638
+stderr 638
+stdout 639
+stderr 639
+stdout 640
+stderr 640
+stdout 641
+stderr 641
+stdout 642
+stderr 642
+stdout 643
+stderr 643
+stdout 644
+stderr 644
+stdout 645
+stderr 645
+stdout 646
+stderr 646
+stdout 647
+stderr 647
+stdout 648
+stderr 648
+stdout 649
+stderr 649
+stdout 650
+stderr 650
+stdout 651
+stderr 651
+stdout 652
+stderr 652
+stdout 653
+stderr 653
+stdout 654
+stderr 654
+stdout 655
+stderr 655
+stdout 656
+stderr 656
+stdout 657
+stderr 657
+stdout 658
+stderr 658
+stdout 659
+stderr 659
+stdout 660
+stderr 660
+stdout 661
+stderr 661
+stdout 662
+stderr 662
+stdout 663
+stderr 663
+stdout 664
+stderr 664
+stdout 665
+stderr 665
+stdout 666
+stderr 666
+stdout 667
+stderr 667
+stdout 668
+stderr 668
+stdout 669
+stderr 669
+stdout 670
+stderr 670
+stdout 671
+stderr 671
+stdout 672
+stderr 672
+stdout 673
+stderr 673
+stdout 674
+stderr 674
+stdout 675
+stderr 675
+stdout 676
+stderr 676
+stdout 677
+stderr 677
+stdout 678
+stderr 678
+stdout 679
+stderr 679
+stdout 680
+stderr 680
+stdout 681
+stderr 681
+stdout 682
+stderr 682
+stdout 683
+stderr 683
+stdout 684
+stderr 684
+stdout 685
+stderr 685
+stdout 686
+stderr 686
+stdout 687
+stderr 687
+stdout 688
+stderr 688
+stdout 689
+stderr 689
+stdout 690
+stderr 690
+stdout 691
+stderr 691
+stdout 692
+stderr 692
+stdout 693
+stderr 693
+stdout 694
+stderr 694
+stdout 695
+stderr 695
+stdout 696
+stderr 696
+stdout 697
+stderr 697
+stdout 698
+stderr 698
+stdout 699
+stderr 699
+stdout 700
+stderr 700
+stdout 701
+stderr 701
+stdout 702
+stderr 702
+stdout 703
+stderr 703
+stdout 704
+stderr 704
+stdout 705
+stderr 705
+stdout 706
+stderr 706
+stdout 707
+stderr 707
+stdout 708
+stderr 708
+stdout 709
+stderr 709
+stdout 710
+stderr 710
+stdout 711
+stderr 711
+stdout 712
+stderr 712
+stdout 713
+stderr 713
+stdout 714
+stderr 714
+stdout 715
+stderr 715
+stdout 716
+stderr 716
+stdout 717
+stderr 717
+stdout 718
+stderr 718
+stdout 719
+stderr 719
+stdout 720
+stderr 720
+stdout 721
+stderr 721
+stdout 722
+stderr 722
+stdout 723
+stderr 723
+stdout 724
+stderr 724
+stdout 725
+stderr 725
+stdout 726
+stderr 726
+stdout 727
+stderr 727
+stdout 728
+stderr 728
+stdout 729
+stderr 729
+stdout 730
+stderr 730
+stdout 731
+stderr 731
+stdout 732
+stderr 732
+stdout 733
+stderr 733
+stdout 734
+stderr 734
+stdout 735
+stderr 735
+stdout 736
+stderr 736
+stdout 737
+stderr 737
+stdout 738
+stderr 738
+stdout 739
+stderr 739
+stdout 740
+stderr 740
+stdout 741
+stderr 741
+stdout 742
+stderr 742
+stdout 743
+stderr 743
+stdout 744
+stderr 744
+stdout 745
+stderr 745
+stdout 746
+stderr 746
+stdout 747
+stderr 747
+stdout 748
+stderr 748
+stdout 749
+stderr 749
+stdout 750
+stderr 750
+stdout 751
+stderr 751
+stdout 752
+stderr 752
+stdout 753
+stderr 753
+stdout 754
+stderr 754
+stdout 755
+stderr 755
+stdout 756
+stderr 756
+stdout 757
+stderr 757
+stdout 758
+stderr 758
+stdout 759
+stderr 759
+stdout 760
+stderr 760
+stdout 761
+stderr 761
+stdout 762
+stderr 762
+stdout 763
+stderr 763
+stdout 764
+stderr 764
+stdout 765
+stderr 765
+stdout 766
+stderr 766
+stdout 767
+stderr 767
+stdout 768
+stderr 768
+stdout 769
+stderr 769
+stdout 770
+stderr 770
+stdout 771
+stderr 771
+stdout 772
+stderr 772
+stdout 773
+stderr 773
+stdout 774
+stderr 774
+stdout 775
+stderr 775
+stdout 776
+stderr 776
+stdout 777
+stderr 777
+stdout 778
+stderr 778
+stdout 779
+stderr 779
+stdout 780
+stderr 780
+stdout 781
+stderr 781
+stdout 782
+stderr 782
+stdout 783
+stderr 783
+stdout 784
+stderr 784
+stdout 785
+stderr 785
+stdout 786
+stderr 786
+stdout 787
+stderr 787
+stdout 788
+stderr 788
+stdout 789
+stderr 789
+stdout 790
+stderr 790
+stdout 791
+stderr 791
+stdout 792
+stderr 792
+stdout 793
+stderr 793
+stdout 794
+stderr 794
+stdout 795
+stderr 795
+stdout 796
+stderr 796
+stdout 797
+stderr 797
+stdout 798
+stderr 798
+stdout 799
+stderr 799
+stdout 800
+stderr 800
+stdout 801
+stderr 801
+stdout 802
+stderr 802
+stdout 803
+stderr 803
+stdout 804
+stderr 804
+stdout 805
+stderr 805
+stdout 806
+stderr 806
+stdout 807
+stderr 807
+stdout 808
+stderr 808
+stdout 809
+stderr 809
+stdout 810
+stderr 810
+stdout 811
+stderr 811
+stdout 812
+stderr 812
+stdout 813
+stderr 813
+stdout 814
+stderr 814
+stdout 815
+stderr 815
+stdout 816
+stderr 816
+stdout 817
+stderr 817
+stdout 818
+stderr 818
+stdout 819
+stderr 819
+stdout 820
+stderr 820
+stdout 821
+stderr 821
+stdout 822
+stderr 822
+stdout 823
+stderr 823
+stdout 824
+stderr 824
+stdout 825
+stderr 825
+stdout 826
+stderr 826
+stdout 827
+stderr 827
+stdout 828
+stderr 828
+stdout 829
+stderr 829
+stdout 830
+stderr 830
+stdout 831
+stderr 831
+stdout 832
+stderr 832
+stdout 833
+stderr 833
+stdout 834
+stderr 834
+stdout 835
+stderr 835
+stdout 836
+stderr 836
+stdout 837
+stderr 837
+stdout 838
+stderr 838
+stdout 839
+stderr 839
+stdout 840
+stderr 840
+stdout 841
+stderr 841
+stdout 842
+stderr 842
+stdout 843
+stderr 843
+stdout 844
+stderr 844
+stdout 845
+stderr 845
+stdout 846
+stderr 846
+stdout 847
+stderr 847
+stdout 848
+stderr 848
+stdout 849
+stderr 849
+stdout 850
+stderr 850
+stdout 851
+stderr 851
+stdout 852
+stderr 852
+stdout 853
+stderr 853
+stdout 854
+stderr 854
+stdout 855
+stderr 855
+stdout 856
+stderr 856
+stdout 857
+stderr 857
+stdout 858
+stderr 858
+stdout 859
+stderr 859
+stdout 860
+stderr 860
+stdout 861
+stderr 861
+stdout 862
+stderr 862
+stdout 863
+stderr 863
+stdout 864
+stderr 864
+stdout 865
+stderr 865
+stdout 866
+stderr 866
+stdout 867
+stderr 867
+stdout 868
+stderr 868
+stdout 869
+stderr 869
+stdout 870
+stderr 870
+stdout 871
+stderr 871
+stdout 872
+stderr 872
+stdout 873
+stderr 873
+stdout 874
+stderr 874
+stdout 875
+stderr 875
+stdout 876
+stderr 876
+stdout 877
+stderr 877
+stdout 878
+stderr 878
+stdout 879
+stderr 879
+stdout 880
+stderr 880
+stdout 881
+stderr 881
+stdout 882
+stderr 882
+stdout 883
+stderr 883
+stdout 884
+stderr 884
+stdout 885
+stderr 885
+stdout 886
+stderr 886
+stdout 887
+stderr 887
+stdout 888
+stderr 888
+stdout 889
+stderr 889
+stdout 890
+stderr 890
+stdout 891
+stderr 891
+stdout 892
+stderr 892
+stdout 893
+stderr 893
+stdout 894
+stderr 894
+stdout 895
+stderr 895
+stdout 896
+stderr 896
+stdout 897
+stderr 897
+stdout 898
+stderr 898
+stdout 899
+stderr 899
+stdout 900
+stderr 900
+stdout 901
+stderr 901
+stdout 902
+stderr 902
+stdout 903
+stderr 903
+stdout 904
+stderr 904
+stdout 905
+stderr 905
+stdout 906
+stderr 906
+stdout 907
+stderr 907
+stdout 908
+stderr 908
+stdout 909
+stderr 909
+stdout 910
+stderr 910
+stdout 911
+stderr 911
+stdout 912
+stderr 912
+stdout 913
+stderr 913
+stdout 914
+stderr 914
+stdout 915
+stderr 915
+stdout 916
+stderr 916
+stdout 917
+stderr 917
+stdout 918
+stderr 918
+stdout 919
+stderr 919
+stdout 920
+stderr 920
+stdout 921
+stderr 921
+stdout 922
+stderr 922
+stdout 923
+stderr 923
+stdout 924
+stderr 924
+stdout 925
+stderr 925
+stdout 926
+stderr 926
+stdout 927
+stderr 927
+stdout 928
+stderr 928
+stdout 929
+stderr 929
+stdout 930
+stderr 930
+stdout 931
+stderr 931
+stdout 932
+stderr 932
+stdout 933
+stderr 933
+stdout 934
+stderr 934
+stdout 935
+stderr 935
+stdout 936
+stderr 936
+stdout 937
+stderr 937
+stdout 938
+stderr 938
+stdout 939
+stderr 939
+stdout 940
+stderr 940
+stdout 941
+stderr 941
+stdout 942
+stderr 942
+stdout 943
+stderr 943
+stdout 944
+stderr 944
+stdout 945
+stderr 945
+stdout 946
+stderr 946
+stdout 947
+stderr 947
+stdout 948
+stderr 948
+stdout 949
+stderr 949
+stdout 950
+stderr 950
+stdout 951
+stderr 951
+stdout 952
+stderr 952
+stdout 953
+stderr 953
+stdout 954
+stderr 954
+stdout 955
+stderr 955
+stdout 956
+stderr 956
+stdout 957
+stderr 957
+stdout 958
+stderr 958
+stdout 959
+stderr 959
+stdout 960
+stderr 960
+stdout 961
+stderr 961
+stdout 962
+stderr 962
+stdout 963
+stderr 963
+stdout 964
+stderr 964
+stdout 965
+stderr 965
+stdout 966
+stderr 966
+stdout 967
+stderr 967
+stdout 968
+stderr 968
+stdout 969
+stderr 969
+stdout 970
+stderr 970
+stdout 971
+stderr 971
+stdout 972
+stderr 972
+stdout 973
+stderr 973
+stdout 974
+stderr 974
+stdout 975
+stderr 975
+stdout 976
+stderr 976
+stdout 977
+stderr 977
+stdout 978
+stderr 978
+stdout 979
+stderr 979
+stdout 980
+stderr 980
+stdout 981
+stderr 981
+stdout 982
+stderr 982
+stdout 983
+stderr 983
+stdout 984
+stderr 984
+stdout 985
+stderr 985
+stdout 986
+stderr 986
+stdout 987
+stderr 987
+stdout 988
+stderr 988
+stdout 989
+stderr 989
+stdout 990
+stderr 990
+stdout 991
+stderr 991
+stdout 992
+stderr 992
+stdout 993
+stderr 993
+stdout 994
+stderr 994
+stdout 995
+stderr 995
+stdout 996
+stderr 996
+stdout 997
+stderr 997
+stdout 998
+stderr 998
+stdout 999
+stderr 999
diff --git a/test/fixtures/1000-stdout.txt b/test/fixtures/1000-stdout.txt
new file mode 100644
index 0000000..d3649d0
--- /dev/null
+++ b/test/fixtures/1000-stdout.txt
@@ -0,0 +1,1000 @@
+stdout 0
+stdout 1
+stdout 2
+stdout 3
+stdout 4
+stdout 5
+stdout 6
+stdout 7
+stdout 8
+stdout 9
+stdout 10
+stdout 11
+stdout 12
+stdout 13
+stdout 14
+stdout 15
+stdout 16
+stdout 17
+stdout 18
+stdout 19
+stdout 20
+stdout 21
+stdout 22
+stdout 23
+stdout 24
+stdout 25
+stdout 26
+stdout 27
+stdout 28
+stdout 29
+stdout 30
+stdout 31
+stdout 32
+stdout 33
+stdout 34
+stdout 35
+stdout 36
+stdout 37
+stdout 38
+stdout 39
+stdout 40
+stdout 41
+stdout 42
+stdout 43
+stdout 44
+stdout 45
+stdout 46
+stdout 47
+stdout 48
+stdout 49
+stdout 50
+stdout 51
+stdout 52
+stdout 53
+stdout 54
+stdout 55
+stdout 56
+stdout 57
+stdout 58
+stdout 59
+stdout 60
+stdout 61
+stdout 62
+stdout 63
+stdout 64
+stdout 65
+stdout 66
+stdout 67
+stdout 68
+stdout 69
+stdout 70
+stdout 71
+stdout 72
+stdout 73
+stdout 74
+stdout 75
+stdout 76
+stdout 77
+stdout 78
+stdout 79
+stdout 80
+stdout 81
+stdout 82
+stdout 83
+stdout 84
+stdout 85
+stdout 86
+stdout 87
+stdout 88
+stdout 89
+stdout 90
+stdout 91
+stdout 92
+stdout 93
+stdout 94
+stdout 95
+stdout 96
+stdout 97
+stdout 98
+stdout 99
+stdout 100
+stdout 101
+stdout 102
+stdout 103
+stdout 104
+stdout 105
+stdout 106
+stdout 107
+stdout 108
+stdout 109
+stdout 110
+stdout 111
+stdout 112
+stdout 113
+stdout 114
+stdout 115
+stdout 116
+stdout 117
+stdout 118
+stdout 119
+stdout 120
+stdout 121
+stdout 122
+stdout 123
+stdout 124
+stdout 125
+stdout 126
+stdout 127
+stdout 128
+stdout 129
+stdout 130
+stdout 131
+stdout 132
+stdout 133
+stdout 134
+stdout 135
+stdout 136
+stdout 137
+stdout 138
+stdout 139
+stdout 140
+stdout 141
+stdout 142
+stdout 143
+stdout 144
+stdout 145
+stdout 146
+stdout 147
+stdout 148
+stdout 149
+stdout 150
+stdout 151
+stdout 152
+stdout 153
+stdout 154
+stdout 155
+stdout 156
+stdout 157
+stdout 158
+stdout 159
+stdout 160
+stdout 161
+stdout 162
+stdout 163
+stdout 164
+stdout 165
+stdout 166
+stdout 167
+stdout 168
+stdout 169
+stdout 170
+stdout 171
+stdout 172
+stdout 173
+stdout 174
+stdout 175
+stdout 176
+stdout 177
+stdout 178
+stdout 179
+stdout 180
+stdout 181
+stdout 182
+stdout 183
+stdout 184
+stdout 185
+stdout 186
+stdout 187
+stdout 188
+stdout 189
+stdout 190
+stdout 191
+stdout 192
+stdout 193
+stdout 194
+stdout 195
+stdout 196
+stdout 197
+stdout 198
+stdout 199
+stdout 200
+stdout 201
+stdout 202
+stdout 203
+stdout 204
+stdout 205
+stdout 206
+stdout 207
+stdout 208
+stdout 209
+stdout 210
+stdout 211
+stdout 212
+stdout 213
+stdout 214
+stdout 215
+stdout 216
+stdout 217
+stdout 218
+stdout 219
+stdout 220
+stdout 221
+stdout 222
+stdout 223
+stdout 224
+stdout 225
+stdout 226
+stdout 227
+stdout 228
+stdout 229
+stdout 230
+stdout 231
+stdout 232
+stdout 233
+stdout 234
+stdout 235
+stdout 236
+stdout 237
+stdout 238
+stdout 239
+stdout 240
+stdout 241
+stdout 242
+stdout 243
+stdout 244
+stdout 245
+stdout 246
+stdout 247
+stdout 248
+stdout 249
+stdout 250
+stdout 251
+stdout 252
+stdout 253
+stdout 254
+stdout 255
+stdout 256
+stdout 257
+stdout 258
+stdout 259
+stdout 260
+stdout 261
+stdout 262
+stdout 263
+stdout 264
+stdout 265
+stdout 266
+stdout 267
+stdout 268
+stdout 269
+stdout 270
+stdout 271
+stdout 272
+stdout 273
+stdout 274
+stdout 275
+stdout 276
+stdout 277
+stdout 278
+stdout 279
+stdout 280
+stdout 281
+stdout 282
+stdout 283
+stdout 284
+stdout 285
+stdout 286
+stdout 287
+stdout 288
+stdout 289
+stdout 290
+stdout 291
+stdout 292
+stdout 293
+stdout 294
+stdout 295
+stdout 296
+stdout 297
+stdout 298
+stdout 299
+stdout 300
+stdout 301
+stdout 302
+stdout 303
+stdout 304
+stdout 305
+stdout 306
+stdout 307
+stdout 308
+stdout 309
+stdout 310
+stdout 311
+stdout 312
+stdout 313
+stdout 314
+stdout 315
+stdout 316
+stdout 317
+stdout 318
+stdout 319
+stdout 320
+stdout 321
+stdout 322
+stdout 323
+stdout 324
+stdout 325
+stdout 326
+stdout 327
+stdout 328
+stdout 329
+stdout 330
+stdout 331
+stdout 332
+stdout 333
+stdout 334
+stdout 335
+stdout 336
+stdout 337
+stdout 338
+stdout 339
+stdout 340
+stdout 341
+stdout 342
+stdout 343
+stdout 344
+stdout 345
+stdout 346
+stdout 347
+stdout 348
+stdout 349
+stdout 350
+stdout 351
+stdout 352
+stdout 353
+stdout 354
+stdout 355
+stdout 356
+stdout 357
+stdout 358
+stdout 359
+stdout 360
+stdout 361
+stdout 362
+stdout 363
+stdout 364
+stdout 365
+stdout 366
+stdout 367
+stdout 368
+stdout 369
+stdout 370
+stdout 371
+stdout 372
+stdout 373
+stdout 374
+stdout 375
+stdout 376
+stdout 377
+stdout 378
+stdout 379
+stdout 380
+stdout 381
+stdout 382
+stdout 383
+stdout 384
+stdout 385
+stdout 386
+stdout 387
+stdout 388
+stdout 389
+stdout 390
+stdout 391
+stdout 392
+stdout 393
+stdout 394
+stdout 395
+stdout 396
+stdout 397
+stdout 398
+stdout 399
+stdout 400
+stdout 401
+stdout 402
+stdout 403
+stdout 404
+stdout 405
+stdout 406
+stdout 407
+stdout 408
+stdout 409
+stdout 410
+stdout 411
+stdout 412
+stdout 413
+stdout 414
+stdout 415
+stdout 416
+stdout 417
+stdout 418
+stdout 419
+stdout 420
+stdout 421
+stdout 422
+stdout 423
+stdout 424
+stdout 425
+stdout 426
+stdout 427
+stdout 428
+stdout 429
+stdout 430
+stdout 431
+stdout 432
+stdout 433
+stdout 434
+stdout 435
+stdout 436
+stdout 437
+stdout 438
+stdout 439
+stdout 440
+stdout 441
+stdout 442
+stdout 443
+stdout 444
+stdout 445
+stdout 446
+stdout 447
+stdout 448
+stdout 449
+stdout 450
+stdout 451
+stdout 452
+stdout 453
+stdout 454
+stdout 455
+stdout 456
+stdout 457
+stdout 458
+stdout 459
+stdout 460
+stdout 461
+stdout 462
+stdout 463
+stdout 464
+stdout 465
+stdout 466
+stdout 467
+stdout 468
+stdout 469
+stdout 470
+stdout 471
+stdout 472
+stdout 473
+stdout 474
+stdout 475
+stdout 476
+stdout 477
+stdout 478
+stdout 479
+stdout 480
+stdout 481
+stdout 482
+stdout 483
+stdout 484
+stdout 485
+stdout 486
+stdout 487
+stdout 488
+stdout 489
+stdout 490
+stdout 491
+stdout 492
+stdout 493
+stdout 494
+stdout 495
+stdout 496
+stdout 497
+stdout 498
+stdout 499
+stdout 500
+stdout 501
+stdout 502
+stdout 503
+stdout 504
+stdout 505
+stdout 506
+stdout 507
+stdout 508
+stdout 509
+stdout 510
+stdout 511
+stdout 512
+stdout 513
+stdout 514
+stdout 515
+stdout 516
+stdout 517
+stdout 518
+stdout 519
+stdout 520
+stdout 521
+stdout 522
+stdout 523
+stdout 524
+stdout 525
+stdout 526
+stdout 527
+stdout 528
+stdout 529
+stdout 530
+stdout 531
+stdout 532
+stdout 533
+stdout 534
+stdout 535
+stdout 536
+stdout 537
+stdout 538
+stdout 539
+stdout 540
+stdout 541
+stdout 542
+stdout 543
+stdout 544
+stdout 545
+stdout 546
+stdout 547
+stdout 548
+stdout 549
+stdout 550
+stdout 551
+stdout 552
+stdout 553
+stdout 554
+stdout 555
+stdout 556
+stdout 557
+stdout 558
+stdout 559
+stdout 560
+stdout 561
+stdout 562
+stdout 563
+stdout 564
+stdout 565
+stdout 566
+stdout 567
+stdout 568
+stdout 569
+stdout 570
+stdout 571
+stdout 572
+stdout 573
+stdout 574
+stdout 575
+stdout 576
+stdout 577
+stdout 578
+stdout 579
+stdout 580
+stdout 581
+stdout 582
+stdout 583
+stdout 584
+stdout 585
+stdout 586
+stdout 587
+stdout 588
+stdout 589
+stdout 590
+stdout 591
+stdout 592
+stdout 593
+stdout 594
+stdout 595
+stdout 596
+stdout 597
+stdout 598
+stdout 599
+stdout 600
+stdout 601
+stdout 602
+stdout 603
+stdout 604
+stdout 605
+stdout 606
+stdout 607
+stdout 608
+stdout 609
+stdout 610
+stdout 611
+stdout 612
+stdout 613
+stdout 614
+stdout 615
+stdout 616
+stdout 617
+stdout 618
+stdout 619
+stdout 620
+stdout 621
+stdout 622
+stdout 623
+stdout 624
+stdout 625
+stdout 626
+stdout 627
+stdout 628
+stdout 629
+stdout 630
+stdout 631
+stdout 632
+stdout 633
+stdout 634
+stdout 635
+stdout 636
+stdout 637
+stdout 638
+stdout 639
+stdout 640
+stdout 641
+stdout 642
+stdout 643
+stdout 644
+stdout 645
+stdout 646
+stdout 647
+stdout 648
+stdout 649
+stdout 650
+stdout 651
+stdout 652
+stdout 653
+stdout 654
+stdout 655
+stdout 656
+stdout 657
+stdout 658
+stdout 659
+stdout 660
+stdout 661
+stdout 662
+stdout 663
+stdout 664
+stdout 665
+stdout 666
+stdout 667
+stdout 668
+stdout 669
+stdout 670
+stdout 671
+stdout 672
+stdout 673
+stdout 674
+stdout 675
+stdout 676
+stdout 677
+stdout 678
+stdout 679
+stdout 680
+stdout 681
+stdout 682
+stdout 683
+stdout 684
+stdout 685
+stdout 686
+stdout 687
+stdout 688
+stdout 689
+stdout 690
+stdout 691
+stdout 692
+stdout 693
+stdout 694
+stdout 695
+stdout 696
+stdout 697
+stdout 698
+stdout 699
+stdout 700
+stdout 701
+stdout 702
+stdout 703
+stdout 704
+stdout 705
+stdout 706
+stdout 707
+stdout 708
+stdout 709
+stdout 710
+stdout 711
+stdout 712
+stdout 713
+stdout 714
+stdout 715
+stdout 716
+stdout 717
+stdout 718
+stdout 719
+stdout 720
+stdout 721
+stdout 722
+stdout 723
+stdout 724
+stdout 725
+stdout 726
+stdout 727
+stdout 728
+stdout 729
+stdout 730
+stdout 731
+stdout 732
+stdout 733
+stdout 734
+stdout 735
+stdout 736
+stdout 737
+stdout 738
+stdout 739
+stdout 740
+stdout 741
+stdout 742
+stdout 743
+stdout 744
+stdout 745
+stdout 746
+stdout 747
+stdout 748
+stdout 749
+stdout 750
+stdout 751
+stdout 752
+stdout 753
+stdout 754
+stdout 755
+stdout 756
+stdout 757
+stdout 758
+stdout 759
+stdout 760
+stdout 761
+stdout 762
+stdout 763
+stdout 764
+stdout 765
+stdout 766
+stdout 767
+stdout 768
+stdout 769
+stdout 770
+stdout 771
+stdout 772
+stdout 773
+stdout 774
+stdout 775
+stdout 776
+stdout 777
+stdout 778
+stdout 779
+stdout 780
+stdout 781
+stdout 782
+stdout 783
+stdout 784
+stdout 785
+stdout 786
+stdout 787
+stdout 788
+stdout 789
+stdout 790
+stdout 791
+stdout 792
+stdout 793
+stdout 794
+stdout 795
+stdout 796
+stdout 797
+stdout 798
+stdout 799
+stdout 800
+stdout 801
+stdout 802
+stdout 803
+stdout 804
+stdout 805
+stdout 806
+stdout 807
+stdout 808
+stdout 809
+stdout 810
+stdout 811
+stdout 812
+stdout 813
+stdout 814
+stdout 815
+stdout 816
+stdout 817
+stdout 818
+stdout 819
+stdout 820
+stdout 821
+stdout 822
+stdout 823
+stdout 824
+stdout 825
+stdout 826
+stdout 827
+stdout 828
+stdout 829
+stdout 830
+stdout 831
+stdout 832
+stdout 833
+stdout 834
+stdout 835
+stdout 836
+stdout 837
+stdout 838
+stdout 839
+stdout 840
+stdout 841
+stdout 842
+stdout 843
+stdout 844
+stdout 845
+stdout 846
+stdout 847
+stdout 848
+stdout 849
+stdout 850
+stdout 851
+stdout 852
+stdout 853
+stdout 854
+stdout 855
+stdout 856
+stdout 857
+stdout 858
+stdout 859
+stdout 860
+stdout 861
+stdout 862
+stdout 863
+stdout 864
+stdout 865
+stdout 866
+stdout 867
+stdout 868
+stdout 869
+stdout 870
+stdout 871
+stdout 872
+stdout 873
+stdout 874
+stdout 875
+stdout 876
+stdout 877
+stdout 878
+stdout 879
+stdout 880
+stdout 881
+stdout 882
+stdout 883
+stdout 884
+stdout 885
+stdout 886
+stdout 887
+stdout 888
+stdout 889
+stdout 890
+stdout 891
+stdout 892
+stdout 893
+stdout 894
+stdout 895
+stdout 896
+stdout 897
+stdout 898
+stdout 899
+stdout 900
+stdout 901
+stdout 902
+stdout 903
+stdout 904
+stdout 905
+stdout 906
+stdout 907
+stdout 908
+stdout 909
+stdout 910
+stdout 911
+stdout 912
+stdout 913
+stdout 914
+stdout 915
+stdout 916
+stdout 917
+stdout 918
+stdout 919
+stdout 920
+stdout 921
+stdout 922
+stdout 923
+stdout 924
+stdout 925
+stdout 926
+stdout 927
+stdout 928
+stdout 929
+stdout 930
+stdout 931
+stdout 932
+stdout 933
+stdout 934
+stdout 935
+stdout 936
+stdout 937
+stdout 938
+stdout 939
+stdout 940
+stdout 941
+stdout 942
+stdout 943
+stdout 944
+stdout 945
+stdout 946
+stdout 947
+stdout 948
+stdout 949
+stdout 950
+stdout 951
+stdout 952
+stdout 953
+stdout 954
+stdout 955
+stdout 956
+stdout 957
+stdout 958
+stdout 959
+stdout 960
+stdout 961
+stdout 962
+stdout 963
+stdout 964
+stdout 965
+stdout 966
+stdout 967
+stdout 968
+stdout 969
+stdout 970
+stdout 971
+stdout 972
+stdout 973
+stdout 974
+stdout 975
+stdout 976
+stdout 977
+stdout 978
+stdout 979
+stdout 980
+stdout 981
+stdout 982
+stdout 983
+stdout 984
+stdout 985
+stdout 986
+stdout 987
+stdout 988
+stdout 989
+stdout 990
+stdout 991
+stdout 992
+stdout 993
+stdout 994
+stdout 995
+stdout 996
+stdout 997
+stdout 998
+stdout 999
diff --git a/test/fixtures/create-files.sh b/test/fixtures/create-files.sh
new file mode 100755
index 0000000..6a526de
--- /dev/null
+++ b/test/fixtures/create-files.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+rm 10*.txt
+for n in 10 100 1000; do
+  node log.js 0 $n stdout stderr &> $n-stdout-stderr.txt
+  node log.js 0 $n stdout &> $n-stdout.txt
+  node log.js 0 $n stderr &> $n-stderr.txt
+done
diff --git a/test/fixtures/log-broken.js b/test/fixtures/log-broken.js
new file mode 100644
index 0000000..74c8f12
--- /dev/null
+++ b/test/fixtures/log-broken.js
@@ -0,0 +1,23 @@
+var errorCode = process.argv[2];
+var max = process.argv[3];
+var modes = process.argv.slice(4);
+
+function stdout(message) {
+  if (modes.indexOf('stdout') === -1) { return; }
+  process.stdout.write('stdout ' + message + '\n');
+}
+
+function stderr(message) {
+  if (modes.indexOf('stderr') === -1) { return; }
+  process.stderr.write('stderr ' + message + '\n');
+}
+
+for (var i = 0; i < max; i++) {
+  stdout(i);
+  stderr(i);
+}
+
+process.exit(errorCode);
+
+stdout('fail');
+stderr('fail');
diff --git a/test/fixtures/log.js b/test/fixtures/log.js
new file mode 100644
index 0000000..8a9ed9a
--- /dev/null
+++ b/test/fixtures/log.js
@@ -0,0 +1,25 @@
+var exit = require('../../lib/exit');
+
+var errorCode = process.argv[2];
+var max = process.argv[3];
+var modes = process.argv.slice(4);
+
+function stdout(message) {
+  if (modes.indexOf('stdout') === -1) { return; }
+  process.stdout.write('stdout ' + message + '\n');
+}
+
+function stderr(message) {
+  if (modes.indexOf('stderr') === -1) { return; }
+  process.stderr.write('stderr ' + message + '\n');
+}
+
+for (var i = 0; i < max; i++) {
+  stdout(i);
+  stderr(i);
+}
+
+exit(errorCode);
+
+stdout('fail');
+stderr('fail');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-exit.git



More information about the Pkg-javascript-commits mailing list