Enhancement - #36, #37

- Added features #36 and #37, providing annual versions of the 'history'
  and 'ghistory' command as 'history.annual' and 'ghistory.annual'.
- Uses new canonical names history.monthly, history.annual, ghistory.monthly
  and ghistory.annual, with aliases providing original history and ghistory
  commands.
- Updated man pages.
This commit is contained in:
Paul Beckingham
2010-05-30 17:01:38 -04:00
parent fcbc8a2ee2
commit d92e80e289
11 changed files with 542 additions and 108 deletions

View File

@@ -33,7 +33,7 @@ Context context;
////////////////////////////////////////////////////////////////////////////////
int main (int argc, char** argv)
{
UnitTest t (78);
UnitTest t (84);
// Without Context::initialize, there is no set of defaults loaded into
// Context::Config.
@@ -65,13 +65,21 @@ int main (int argc, char** argv)
t.ok (cmd.isReadOnlyCommand (), "isReadOnlyCommand help");
t.notok (cmd.isWriteCommand (), "not isWriteCommand help");
cmd.command = "history";
t.ok (cmd.isReadOnlyCommand (), "isReadOnlyCommand history");
t.notok (cmd.isWriteCommand (), "not isWriteCommand history");
cmd.command = "history.monthly";
t.ok (cmd.isReadOnlyCommand (), "isReadOnlyCommand history.monthly");
t.notok (cmd.isWriteCommand (), "not isWriteCommand history.monthly");
cmd.command = "ghistory";
t.ok (cmd.isReadOnlyCommand (), "isReadOnlyCommand ghistory");
t.notok (cmd.isWriteCommand (), "not isWriteCommand ghistory");
cmd.command = "history.annual";
t.ok (cmd.isReadOnlyCommand (), "isReadOnlyCommand history.annual");
t.notok (cmd.isWriteCommand (), "not isWriteCommand history.annual");
cmd.command = "ghistory.monthly";
t.ok (cmd.isReadOnlyCommand (), "isReadOnlyCommand ghistory.monthly");
t.notok (cmd.isWriteCommand (), "not isWriteCommand ghistory.monthly");
cmd.command = "ghistory.annual";
t.ok (cmd.isReadOnlyCommand (), "isReadOnlyCommand ghistory.annual");
t.notok (cmd.isWriteCommand (), "not isWriteCommand ghistory.annual");
cmd.command = "info";
t.ok (cmd.isReadOnlyCommand (), "isReadOnlyCommand info");
@@ -121,6 +129,10 @@ int main (int argc, char** argv)
t.notok (cmd.isReadOnlyCommand (), "not isReadOnlyCommand add");
t.ok (cmd.isWriteCommand (), "isWriteCommand add");
cmd.command = "log";
t.notok (cmd.isReadOnlyCommand (), "not isReadOnlyCommand log");
t.ok (cmd.isWriteCommand (), "isWriteCommand log");
cmd.command = "append";
t.notok (cmd.isReadOnlyCommand (), "not isReadOnlyCommand append");
t.ok (cmd.isWriteCommand (), "isWriteCommand append");