diff options
author | Cliff Brake <cbrake@bec-systems.com> | 2012-08-16 11:02:23 -0400 |
---|---|---|
committer | Cliff Brake <cbrake@bec-systems.com> | 2012-08-16 11:02:23 -0400 |
commit | c11f922b0bfa023a4cf49f26e55aec6a1413344b (patch) | |
tree | 79daf7b525928b8863be0201e552c54123fe58f9 /tools/test | |
parent | 6560aace7f44e84690380d024e2b43e46a772c18 (diff) | |
download | openembedded-admin-c11f922b0bfa023a4cf49f26e55aec6a1413344b.tar.gz |
update weekly changelog tools
Diffstat (limited to 'tools/test')
-rw-r--r-- | tools/test/dateutil.test.js | 18 | ||||
-rw-r--r-- | tools/test/git.test.js | 4 |
2 files changed, 20 insertions, 2 deletions
diff --git a/tools/test/dateutil.test.js b/tools/test/dateutil.test.js new file mode 100644 index 0000000..8023a8f --- /dev/null +++ b/tools/test/dateutil.test.js @@ -0,0 +1,18 @@ +var dateutil = require('../dateutil'), + util = require('util'), + assert = require('assert') + +exports.test_last_week = function() { + var lastwk = dateutil.last_week() + console.log(util.inspect(lastwk)) + + assert(/Sun.*00:00:00/.exec(lastwk.start.toUTCString()), "lastwk start is not correct " + lastwk.start.toUTCString()) + + assert(/Sun.*00:00:00/.exec(lastwk.end.toUTCString()), "lastwk end is not correct " + lastwk.start.toUTCString()) + +} + +exports.test_last_week_text = function() { + console.log(dateutil.last_week_text()) +} + diff --git a/tools/test/git.test.js b/tools/test/git.test.js index 9fc1ddd..7afdb4f 100644 --- a/tools/test/git.test.js +++ b/tools/test/git.test.js @@ -19,8 +19,8 @@ exports.test_changelog = function() { var repo_dir = path.join(__dirname, 'fixture/openembedded-admin'); var expected = "Cliff Brake (2):\n initial commit of admin repos and tools\n add .gitignore\n\n" child_process.exec('git clone git://git.openembedded.org/openembedded-admin ' + repo_dir, function(error, stdout, stderr) { - var start = new Date('2011-05-19'); - var end = new Date('2011-05-20'); + var start = new Date('2011-05-18'); + var end = new Date('2011-05-19'); git.changelog(repo_dir, start, end, function(err, changelog) { assert.equal(err, null); assert.equal(changelog, expected); |