mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 22:33:08 +02:00
Message Format
- Relaxed message parsing slightly.
This commit is contained in:
parent
82c4b05fe4
commit
12809fd0bf
2 changed files with 20 additions and 15 deletions
|
@ -36,7 +36,7 @@ Context context;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (8);
|
||||
UnitTest t (12);
|
||||
|
||||
Msg m;
|
||||
t.is (m.serialize (), std::string ("client: ") + PACKAGE_STRING + "\n\n\n", "Msg::serialize '' --> '\\n\\n'");
|
||||
|
@ -55,6 +55,12 @@ int main (int argc, char** argv)
|
|||
t.is (m2.get ("foo"), "bar", "Msg::get");
|
||||
t.is (m2.get ("name"), "value", "Msg::get");
|
||||
t.is (m2.getPayload (), "payload\n", "Msg::getPayload");
|
||||
|
||||
Msg m3;
|
||||
t.ok (m3.parse ("foo:bar\nname: value\n\npayload\n"), "Msg::parse ok");
|
||||
t.is (m3.get ("foo"), "bar", "Msg::get");
|
||||
t.is (m3.get ("name"), "value", "Msg::get");
|
||||
t.is (m3.getPayload (), "payload\n", "Msg::getPayload");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue