diff --git a/Makefile b/Makefile index 10597c6..f6ac252 100644 --- a/Makefile +++ b/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) diff --git a/test/cli.test.js b/test/cli.test.js index e8f21d3..c6fee59 100644 --- a/test/cli.test.js +++ b/test/cli.test.js @@ -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(); } );