| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4b35dfb commit 79ba863
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,6 +26,7 @@ const path = require('path'); | |||
| 26 | 26 | const fs = require('fs'); | |
| 27 | 27 | const fn = path.join(common.tmpDir, 'write.txt'); | |
| 28 | 28 | const fn2 = path.join(common.tmpDir, 'write2.txt'); | |
| 29 | + const fn3 = path.join(common.tmpDir, 'write3.txt'); | ||
| 29 | 30 | const expected = 'ümlaut.'; | |
| 30 | 31 | const constants = fs.constants; | |
| 31 | 32 | ||
@@ -73,3 +74,15 @@ fs.open(fn2, args, 0o644, common.mustCall((err, fd) => { | |||
| 73 | 74 | fs.write(fd, '', 0, 'utf8', written); | |
| 74 | 75 | fs.write(fd, expected, 0, 'utf8', done); | |
| 75 | 76 | })); | |
| 77 | + | ||
| 78 | + fs.open(fn3, 'w', 0o644, common.mustCall(function(err, fd) { | ||
| 79 | + assert.ifError(err); | ||
| 80 | + | ||
| 81 | + const done = common.mustCall(function(err, written) { | ||
| 82 | + assert.ifError(err); | ||
| 83 | + assert.strictEqual(Buffer.byteLength(expected), written); | ||
| 84 | + fs.closeSync(fd); | ||
| 85 | + }); | ||
| 86 | + | ||
| 87 | + fs.write(fd, expected, done); | ||
| 88 | + })); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments