Bug Fixes, Unit Tests

- Fixed bug where "foo:bar" was not recognized as an attribute, and
  generated an error rather than demoting is to part of the description.
- Fixed bug where en-passant deltas were applied only to the first task
  in a sequence.
- Fixed various unit test.
This commit is contained in:
Paul Beckingham 2009-06-18 22:01:43 -04:00
parent 1511c1fcfd
commit 9c2e70b73a
9 changed files with 53 additions and 39 deletions

View file

@ -428,12 +428,26 @@ void Context::parse (
std::string name = attribute.name ();
std::string mod = attribute.mod ();
std::string value = attribute.value ();
attribute.validNameValue (name, mod, value);
attribute.name (name);
attribute.mod (mod);
attribute.value (value);
if (attribute.validNameValue (name, mod, value))
{
attribute.name (name);
attribute.mod (mod);
attribute.value (value);
parseTask[attribute.name ()] = attribute;
parseTask[attribute.name ()] = attribute;
}
// *arg has the appearance of an attribute (foo:bar), but isn't
// recognized, so downgrade it to part of the description.
else
{
if (foundSequence)
foundSomethingAfterSequence = true;
if (descCandidate.length ())
descCandidate += " ";
descCandidate += *arg;
}
}
// Substitution of description and/or annotation text.