summaryrefslogtreecommitdiff
path: root/test/simple/test-fs-read.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-05-20 16:11:33 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-05-20 16:11:33 -0700
commite84395ff8c50a0b54cd2885de8d93a5b39b8477c (patch)
tree14ea543b288043feb8edf55f9cba37f666e73f6a /test/simple/test-fs-read.js
parentcbbf9e43d1770047e98fe65d5f710815f432a5b4 (diff)
downloadnode-new-e84395ff8c50a0b54cd2885de8d93a5b39b8477c.tar.gz
Revert "Deprecate string interface for fs.read()"
This reverts commit cbbf9e43d1770047e98fe65d5f710815f432a5b4.
Diffstat (limited to 'test/simple/test-fs-read.js')
-rw-r--r--test/simple/test-fs-read.js23
1 files changed, 0 insertions, 23 deletions
diff --git a/test/simple/test-fs-read.js b/test/simple/test-fs-read.js
deleted file mode 100644
index 7f9bf48d4a..0000000000
--- a/test/simple/test-fs-read.js
+++ /dev/null
@@ -1,23 +0,0 @@
-require('../common');
-var path = require('path'),
- fs = require('fs'),
- filepath = path.join(fixturesDir, 'x.txt'),
- fd = fs.openSync(filepath, 'r'),
- expected = 'xyz\n',
- readCalled = 0;
-
-fs.read(fd, expected.length, 0, 'utf-8', function(err, str, bytesRead) {
- readCalled++;
-
- assert.ok(!err);
- assert.equal(str, expected);
- assert.equal(bytesRead, expected.length);
-});
-
-var r = fs.readSync(fd, expected.length, 0, 'utf-8');
-assert.equal(r[0], expected);
-assert.equal(r[1], expected.length);
-
-process.addListener('exit', function() {
- assert.equal(readCalled, 1);
-}); \ No newline at end of file