web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
479 B

  1. var errorCode = process.argv[2];
  2. var max = process.argv[3];
  3. var modes = process.argv.slice(4);
  4. function stdout(message) {
  5. if (modes.indexOf('stdout') === -1) { return; }
  6. process.stdout.write('stdout ' + message + '\n');
  7. }
  8. function stderr(message) {
  9. if (modes.indexOf('stderr') === -1) { return; }
  10. process.stderr.write('stderr ' + message + '\n');
  11. }
  12. for (var i = 0; i < max; i++) {
  13. stdout(i);
  14. stderr(i);
  15. }
  16. process.exit(errorCode);
  17. stdout('fail');
  18. stderr('fail');