mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 17:07:19 +02:00
Feature - #352 rc file should support includes
- Added include file support to Config.cpp. - Implemented isAbsolutePath helper. - Added unit tests for isAbsolutePath. - Fixed small bug in bug.bulk.t. - Added TODO items to config.t.cpp.
This commit is contained in:
parent
8d43a35ca4
commit
0780919c2e
8 changed files with 64 additions and 4 deletions
|
@ -52,7 +52,7 @@ qx{../task rc:bulk.rc add t6 due:saturday};
|
|||
my $output = qx{echo "quit"|../task rc:bulk.rc pro:p1 pri:M 4 5 6};
|
||||
like ($output, qr/Modified 0 tasks/, '"quit" prevents any further modifications');
|
||||
|
||||
my $output = qx{echo "all"|../task rc:bulk.rc pro:p1 pri:M 4 5 6};
|
||||
$output = qx{echo "All"|../task rc:bulk.rc pro:p1 pri:M 4 5 6};
|
||||
unlike ($output, qr/Task 4 "t4"\n - No changes were made/, 'Task 4 modified');
|
||||
unlike ($output, qr/Task 5 "t5"\n - No changes were made/, 'Task 5 modified');
|
||||
unlike ($output, qr/Task 6 "t6"\n - No changes were made/, 'Task 6 modified');
|
||||
|
|
|
@ -105,6 +105,11 @@ int main (int argc, char** argv)
|
|||
// 22 default report setting created in Config::Config.
|
||||
t.ok (all.size () >= 8, "Config::all");
|
||||
|
||||
// TODO Test includes
|
||||
// TODO Test included nesting limit
|
||||
// TODO Test included absolute vs relative
|
||||
// TODO Test included missing file
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ Context context;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (67);
|
||||
UnitTest t (74);
|
||||
|
||||
// TODO bool confirm (const std::string&);
|
||||
// TODO int confirm3 (const std::string&);
|
||||
|
@ -113,6 +113,15 @@ int main (int argc, char** argv)
|
|||
// std::string expandPath (const std::string&);
|
||||
t.ok (expandPath ("foo") == "foo", "expandPath nop");
|
||||
t.ok (expandPath ("~/") != "~/", "expandPath ~/");
|
||||
t.ok (expandPath ("~") != "~", "expandPath ~");
|
||||
|
||||
// bool isAbsolutePath (const std::string&);
|
||||
t.notok (isAbsolutePath ("."), "isAbsolutePath .");
|
||||
t.notok (isAbsolutePath ("~"), "isAbsolutePath ~");
|
||||
t.ok (isAbsolutePath (expandPath ("~")), "isAbsolutePath (expandPath ~)");
|
||||
t.ok (isAbsolutePath (expandPath ("~/")), "isAbsolutePath (expandPath ~/)");
|
||||
t.ok (isAbsolutePath ("/"), "isAbsolutePath /");
|
||||
t.ok (isAbsolutePath ("/tmp"), "isAbsolutePath /tmp");
|
||||
|
||||
// TODO bool slurp (const std::string&, std::vector <std::string>&, bool trimLines = false);
|
||||
// TODO bool slurp (const std::string&, std::string&, bool trimLines = false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue