mirror of https://github.com/lukechilds/node.git
Browse Source
still missing several important features and its mostly untested but the script test/test-test.js is working and thats enough for now.v0.7.4-release
Ryan
16 years ago
5 changed files with 162 additions and 141 deletions
@ -1,21 +1,8 @@ |
|||
var filename = ARGV[2]; |
|||
|
|||
function cat (file) { |
|||
file.read(100, function (status, data) { |
|||
if (status == 0 && data) { |
|||
stdout.write(data.encodeUtf8()); |
|||
cat(file); |
|||
} else { |
|||
file.close(); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
var f = new File; |
|||
f.open(filename, "r", function (status) { |
|||
puts("open!"); |
|||
File.cat(filename, function (status, content) { |
|||
if (status == 0) |
|||
cat(f); |
|||
puts(content); |
|||
else |
|||
puts("error?"); |
|||
}) |
|||
puts("error"); |
|||
}); |
|||
puts("hello world"); |
|||
|
@ -1,12 +1,9 @@ |
|||
node.blocking.print(__file__); |
|||
/* |
|||
if (node.path.dirname(__file__) !== "test-test.js") { |
|||
throw "wrong __file__ argument"; |
|||
} |
|||
*/ |
|||
|
|||
var mjsunit = require("./mjsunit.js"); |
|||
node.blocking.print(__file__); |
|||
puts(__filename); |
|||
include("mjsunit"); |
|||
puts(__filename); |
|||
|
|||
mjsunit.assertFalse(false, "testing the test program."); |
|||
function on_load () { |
|||
assertFalse(false, "testing the test program."); |
|||
puts("i think everything is okay."); |
|||
//mjsunit.assertEquals("test-test.js", __file__);
|
|||
} |
|||
|
Loading…
Reference in new issue