test: TTY only has writeBuffer(), not write()
authorisaacs <i@izs.me>
Sat, 1 Dec 2012 02:21:01 +0000 (18:21 -0800)
committerisaacs <i@izs.me>
Sat, 1 Dec 2012 19:17:51 +0000 (11:17 -0800)
This test is only passing because it's skipped normally.

test/simple/test-tty-wrap.js

index da661c4..610b92b 100644 (file)
@@ -33,20 +33,16 @@ if (isTTY(1) == false) {
 var handle = new TTY(1);
 var callbacks = 0;
 
-var req1 = handle.write(Buffer('hello world\n'));
+var req1 = handle.writeBuffer(Buffer('hello world\n'));
 req1.oncomplete = function() {
   callbacks++;
 };
 
-var req2 = handle.write(Buffer('hello world\n'));
+var req2 = handle.writeBuffer(Buffer('hello world\n'));
 req2.oncomplete = function() {
   callbacks++;
 };
 
-handle.close();
-
 process.on('exit', function() {
   assert.equal(2, callbacks);
 });
-
-