mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Nibbler: Removed unused ::getUntilEOL method
This commit is contained in:
parent
0c5984c517
commit
88469fc5f9
3 changed files with 1 additions and 19 deletions
|
@ -153,12 +153,6 @@ bool Nibbler::getUntilWS (std::string& result)
|
|||
return this->getUntilOneOf (" \t\r\n\f", result);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Nibbler::getUntilEOL (std::string& result)
|
||||
{
|
||||
return getUntil ('\n', result);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Nibbler::getUntilEOS (std::string& result)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,6 @@ public:
|
|||
bool getUntil (const std::string&, std::string&);
|
||||
bool getUntilOneOf (const std::string&, std::string&);
|
||||
bool getUntilWS (std::string&);
|
||||
bool getUntilEOL (std::string&);
|
||||
bool getUntilEOS (std::string&);
|
||||
|
||||
bool getN (const int, std::string&);
|
||||
|
|
|
@ -35,7 +35,7 @@ Context context;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int, char**)
|
||||
{
|
||||
UnitTest t (261);
|
||||
UnitTest t (254);
|
||||
|
||||
// Ensure environment has no influence.
|
||||
unsetenv ("TASKDATA");
|
||||
|
@ -64,7 +64,6 @@ int main (int, char**)
|
|||
t.notok (n.getDigit (i), "trivial: getDigit");
|
||||
t.notok (n.getInt (i), "trivial: getInt"); // 10
|
||||
t.notok (n.getUnsignedInt (i), "trivial: getUnsignedInt");
|
||||
t.notok (n.getUntilEOL (s), "trivial: getUntilEOL");
|
||||
t.notok (n.getUntilEOS (s), "trivial: getUntilEOS");
|
||||
t.notok (n.getOneOf (options, s), "trivial: getOneOf");
|
||||
t.ok (n.depleted (), "trivial: depleted");
|
||||
|
@ -456,16 +455,6 @@ int main (int, char**)
|
|||
t.is (s, "3", " '3' : getN (1) -> '1'");
|
||||
t.ok (n.depleted (), " '' : depleted () -> true");
|
||||
|
||||
// bool getUntilEOL (std::string&);
|
||||
t.diag ("Nibbler::getUntilEOL");
|
||||
n = Nibbler ("one\ntwo");
|
||||
t.ok (n.getUntilEOL (s), "'one\\ntwo' : getUntilEOL () -> true");
|
||||
t.is (s, "one", "'one\\ntwo' : getUntilEOL () -> 'one'");
|
||||
t.ok (n.skip ('\n'), " '\\ntwo' : skip ('\\n') -> true");
|
||||
t.ok (n.getUntilEOL (s), " 'two' : getUntilEOL () -> true");
|
||||
t.is (s, "two", " 'two' : getUntilEOL () -> 'two'");
|
||||
t.ok (n.depleted (), " '' : depleted () -> true");
|
||||
|
||||
// bool getUntilEOS (std::string&);
|
||||
t.diag ("Nibbler::getUntilEOS");
|
||||
n = Nibbler ("one two");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue