'make testall' to test against multiple node versions
Change test to look for new ENOENT error message changed in recent nodes: // Note: node v0.6.10: // ENOENT, no such file or directory 'asdf.log' // but node v0.6.14: // ENOENT, open 'asdf.log' // Somewhat annoying change.
This commit is contained in:
parent
0a6e4bc986
commit
6f1433c89b
2 changed files with 31 additions and 1 deletions
25
Makefile
25
Makefile
|
@ -26,10 +26,35 @@ cutarelease: versioncheck
|
|||
[[ ! -d tmp ]] # No 'tmp/' allowed: https://github.com/isaacs/npm/issues/2144 (fixed in npm 1.1.12 / node 0.6.14 I think)
|
||||
./tools/cutarelease.py -p bunyan -f package.json -f lib/bunyan.js -f bin/bunyan
|
||||
|
||||
|
||||
#---- test
|
||||
|
||||
.PHONY: test
|
||||
test: $(TAP)
|
||||
TAP=1 $(TAP) test/*.test.js
|
||||
|
||||
# Test will all node supported versions (presumes install locations I use on my machine).
|
||||
.PHONY: testall
|
||||
testall: test06 test07 testmaster
|
||||
|
||||
.PHONY: testmaster
|
||||
testmaster:
|
||||
@echo "# Test node master (with node `$(HOME)/opt/node-master/bin/node --version`)"
|
||||
PATH="$(HOME)/opt/node-master/bin:$(PATH)" TAP=1 $(TAP) test/*.test.js
|
||||
|
||||
.PHONY: test07
|
||||
test07:
|
||||
@echo "# Test node 0.7.x (with node `$(HOME)/opt/node-0.7/bin/node --version`)"
|
||||
PATH="$(HOME)/opt/node-0.7/bin:$(PATH)" TAP=1 $(TAP) test/*.test.js
|
||||
|
||||
.PHONY: test06
|
||||
test06:
|
||||
@echo "# Test node 0.6.x (with node `$(HOME)/opt/node-0.6/bin/node --version`)"
|
||||
PATH="$(HOME)/opt/node-0.6/bin:$(PATH)" TAP=1 $(TAP) test/*.test.js
|
||||
|
||||
|
||||
#---- check
|
||||
|
||||
.PHONY: check-jsstyle
|
||||
check-jsstyle: $(JSSTYLE_FILES)
|
||||
./tools/jsstyle -o indent=2,doxygen,unparenthesized-return=0,blank-after-start-comment=0 $(JSSTYLE_FILES)
|
||||
|
|
|
@ -123,7 +123,12 @@ test('simple.log doesnotexist1.log doesnotexist2.log', function (t) {
|
|||
t.ok(err)
|
||||
t.equal(err.code, 2)
|
||||
t.equal(stdout, '[2012-02-08T22:56:52.856Z] INFO: myservice/123 on example.com: My message\n');
|
||||
t.equal(stderr, "bunyan: ENOENT, no such file or directory 'doesnotexist1.log'\nbunyan: ENOENT, no such file or directory 'doesnotexist2.log'\n");
|
||||
// Note: node v0.6.10:
|
||||
// ENOENT, no such file or directory 'asdf.log'
|
||||
// but node v0.6.14:
|
||||
// ENOENT, open 'asdf.log'
|
||||
// Somewhat annoying change.
|
||||
t.equal(stderr, "bunyan: ENOENT, open 'doesnotexist1.log'\nbunyan: ENOENT, open 'doesnotexist2.log'\n");
|
||||
t.end();
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue