mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- Removed unused text.cpp noVerticalSpace function.
This commit is contained in:
parent
3f07173a03
commit
8a904fc287
3 changed files with 1 additions and 19 deletions
|
@ -560,15 +560,6 @@ bool noSpaces (const std::string& input)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
bool noVerticalSpace (const std::string& input)
|
|
||||||
{
|
|
||||||
if (input.find_first_of ("\n\r\f") != std::string::npos)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Override of ispunct, that considers #, $ and @ not to be punctuation.
|
// Override of ispunct, that considers #, $ and @ not to be punctuation.
|
||||||
//
|
//
|
||||||
|
|
|
@ -55,7 +55,6 @@ void guess (const std::string&, std::vector<std::string>&, std::string&);
|
||||||
bool nontrivial (const std::string&);
|
bool nontrivial (const std::string&);
|
||||||
bool digitsOnly (const std::string&);
|
bool digitsOnly (const std::string&);
|
||||||
bool noSpaces (const std::string&);
|
bool noSpaces (const std::string&);
|
||||||
bool noVerticalSpace (const std::string&);
|
|
||||||
bool isPunctuation (char);
|
bool isPunctuation (char);
|
||||||
std::string visible (char);
|
std::string visible (char);
|
||||||
bool compare (const std::string&, const std::string&, bool sensitive = true);
|
bool compare (const std::string&, const std::string&, bool sensitive = true);
|
||||||
|
|
|
@ -37,7 +37,7 @@ Context context;
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
UnitTest t (227);
|
UnitTest t (221);
|
||||||
|
|
||||||
// Ensure environment has no influence.
|
// Ensure environment has no influence.
|
||||||
unsetenv ("TASKDATA");
|
unsetenv ("TASKDATA");
|
||||||
|
@ -316,14 +316,6 @@ int main (int argc, char** argv)
|
||||||
t.notok (noSpaces (" "), "noSpaces ' ' -> false");
|
t.notok (noSpaces (" "), "noSpaces ' ' -> false");
|
||||||
t.notok (noSpaces ("ab cd"), "noSpaces 'ab cd' -> false");
|
t.notok (noSpaces ("ab cd"), "noSpaces 'ab cd' -> false");
|
||||||
|
|
||||||
// bool noVerticalSpace (const std::string&);
|
|
||||||
t.ok (noVerticalSpace (""), "noVerticalSpace '' -> true");
|
|
||||||
t.ok (noVerticalSpace ("a"), "noVerticalSpace 'a' -> true");
|
|
||||||
t.ok (noVerticalSpace ("abc"), "noVerticalSpace 'abc' -> true");
|
|
||||||
t.notok (noVerticalSpace ("a\nb"), "noVerticalSpace 'a\\nb' -> false");
|
|
||||||
t.notok (noVerticalSpace ("a\rb"), "noVerticalSpace 'a\\rb' -> false");
|
|
||||||
t.notok (noVerticalSpace ("a\fb"), "noVerticalSpace 'a\\fb' -> false");
|
|
||||||
|
|
||||||
// bool compare (const std::string&, const std::string&, bool caseless = false);
|
// bool compare (const std::string&, const std::string&, bool caseless = false);
|
||||||
// Make sure degenerate cases are handled.
|
// Make sure degenerate cases are handled.
|
||||||
t.ok (compare ("", ""), "'' == ''");
|
t.ok (compare ("", ""), "'' == ''");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue