mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
Enhancement
- Broke the indentTree function into two pieces - one that processes a list, the other that processes a single item. This makes it more efficient for use places that have only one element.
This commit is contained in:
parent
29b0d24745
commit
95e36d1145
3 changed files with 29 additions and 17 deletions
|
@ -35,7 +35,7 @@ Context context;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (36);
|
||||
UnitTest t (40);
|
||||
|
||||
// TODO bool confirm (const std::string&);
|
||||
// TODO int confirm3 (const std::string&);
|
||||
|
@ -129,6 +129,12 @@ int main (int argc, char** argv)
|
|||
t.is (structured[3], " one.four", "indentTree 'one.four' -> ' one.four'");
|
||||
t.is (structured[4], "two", "indentTree 'two' -> 'two'");
|
||||
|
||||
// std::vector<std::string> indentProject (const std::string&, const std::string whitespace=" ", char delimiter='.');
|
||||
t.is (indentProject (""), "", "indentProject '' -> ''");
|
||||
t.is (indentProject ("one"), "one", "indentProject 'one' -> 'one'");
|
||||
t.is (indentProject ("one.two"), " one.two", "indentProject 'one.two' -> ' one.two'");
|
||||
t.is (indentProject ("one.two.three"), " one.two.three", "indentProject 'one.two.three' -> ' one.two.three'");
|
||||
|
||||
// TODO const std::string encode (const std::string& value);
|
||||
// TODO const std::string decode (const std::string& value);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue