Bug Fix - blank annotations now disallowed
- Prevented blank annotations from being added, and the description being echoed as though it were the annotation applied (thanks to Bruce Dillahunty). - Added bug.annotate.t unit test to prevent regression.
This commit is contained in:
20
src/T.cpp
20
src/T.cpp
@@ -584,16 +584,6 @@ void T::parse (const std::string& line)
|
||||
// If this code is inaccurate, data corruption ensues.
|
||||
int T::determineVersion (const std::string& line)
|
||||
{
|
||||
// Version 1 looks like:
|
||||
//
|
||||
// [tags] [attributes] description\n
|
||||
// X [tags] [attributes] description\n
|
||||
//
|
||||
// Scan for the first character being either the bracket or X.
|
||||
if ((line[0] == '[' && line[line.length () - 1] != ']') ||
|
||||
line.find ("X [") != std::string::npos)
|
||||
return 1;
|
||||
|
||||
// Version 2 looks like:
|
||||
//
|
||||
// uuid status [tags] [attributes] description\n
|
||||
@@ -627,6 +617,16 @@ int T::determineVersion (const std::string& line)
|
||||
return 2;
|
||||
}
|
||||
|
||||
// Version 1 looks like:
|
||||
//
|
||||
// [tags] [attributes] description\n
|
||||
// X [tags] [attributes] description\n
|
||||
//
|
||||
// Scan for the first character being either the bracket or X.
|
||||
else if ((line[0] == '[' && line[line.length () - 1] != ']') ||
|
||||
line.find ("X [") == 0)
|
||||
return 1;
|
||||
|
||||
// Version 4 looks like:
|
||||
//
|
||||
// [name:"value" ...]
|
||||
|
||||
Reference in New Issue
Block a user