Skip to content
Browse files

refact

  • Loading branch information...
1 parent d110fdf commit 310064d1331af8674c13598bdf2649d7774d48fe @tokuhirom committed
Showing with 39 additions and 3 deletions.
  1. +8 −2 Makefile
  2. +17 −0 package.json
  3. +14 −1 { → test}/test.js
View
10 Makefile
@@ -1,13 +1,19 @@
all: gdbm.node
-gdbm.node: gdbm.cc
+build/config.log:
+ node-waf configure
+
+gdbm.node: gdbm.cc build/config.log
node-waf
test: gdbm.node
- nodeunit test.js
+ nodeunit test/
deps:
npm install nodeunit
+clean:
+ rm -rf build/ hoge.db .lock-wscript
+
.PHONY: test all
View
17 package.json
@@ -0,0 +1,17 @@
+{
+ "author": "Tokuhiro Matsuno <tokuhirom@gmail.com> (http://64p.org/)",
+ "name": "gdbm",
+ "description": "gdbm for node.js",
+ "version": "1.0.0",
+ "repository": {
+ "url": ""
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "engines": {
+ "node": "~0.6.6"
+ },
+ "dependencies": {},
+ "devDependencies": {}
+}
View
15 test.js → test/test.js
@@ -1,6 +1,6 @@
"use strict";
-var gdbm = require('./build/Release/gdbm'),
+var gdbm = require('../build/Release/gdbm'),
fs = require('fs'),
undefined;
@@ -160,3 +160,16 @@ exports.errHandling = function (t) {
t.done();
};
+exports.argsErrorHandling = function (t) {
+ var db = new gdbm.GDBM();
+
+ var ret = db.open('hoge.db', 0, gdbm.GDBM_WRCREAT);
+ db.store();
+ db.fetch();
+ db.exists();
+ db.reorganize();
+ db.nextkey();
+
+ t.done();
+};
+

0 comments on commit 310064d

Please sign in to comment.
Something went wrong with that request. Please try again.