| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,29 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + const common = require('../common'); | ||
| 3 | + | ||
| 4 | + const originalRefreshSizeStderr = process.stderr._refreshSize; | ||
| 5 | + const originalRefreshSizeStdout = process.stdout._refreshSize; | ||
| 6 | + | ||
| 7 | + const wrap = (fn, ioStream, string) => { | ||
| 8 | + return () => { | ||
| 9 | + // The console.log() call prints a string that is in the .out file. In other | ||
| 10 | + // words, the console.log() is part of the test, not extraneous debugging. | ||
| 11 | + console.log(string); | ||
| 12 | + try { | ||
| 13 | + fn.call(ioStream); | ||
| 14 | + } catch (e) { | ||
| 15 | + // EINVAL happens on SmartOS if emulation is incomplete | ||
| 16 | + if (!common.isSunOS || e.code !== 'EINVAL') | ||
| 17 | + throw e; | ||
| 18 | + } | ||
| 19 | + }; | ||
| 20 | + }; | ||
| 21 | + | ||
| 22 | + process.stderr._refreshSize = wrap(originalRefreshSizeStderr, | ||
| 23 | + process.stderr, | ||
| 24 | + 'calling stderr._refreshSize'); | ||
| 25 | + process.stdout._refreshSize = wrap(originalRefreshSizeStdout, | ||
| 26 | + process.stdout, | ||
| 27 | + 'calling stdout._refreshSize'); | ||
| 28 | + | ||
| 29 | + process.emit('SIGWINCH'); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,2 @@ | |||
| 1 | + calling stdout._refreshSize | ||
| 2 | + calling stderr._refreshSize | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments