summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/atom/atom-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/atom/atom-test.cpp')
-rw-r--r--sca-cpp/trunk/modules/atom/atom-test.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/sca-cpp/trunk/modules/atom/atom-test.cpp b/sca-cpp/trunk/modules/atom/atom-test.cpp
index 056e9ea965..e2e07a8608 100644
--- a/sca-cpp/trunk/modules/atom/atom-test.cpp
+++ b/sca-cpp/trunk/modules/atom/atom-test.cpp
@@ -77,6 +77,17 @@ const string itemNoContentEntry("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<link href=\"cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b\"/>"
"</entry>\n");
+const string itemEmptyTitleEntry("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<entry xmlns=\"http://www.w3.org/2005/Atom\">"
+ "<title type=\"text\"></title>"
+ "<id>cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b</id>"
+ "<author>"
+ "<name>jane</name>"
+ "</author>"
+ "<updated>Fri Jan 01 08:11:36 PDT 2012</updated>"
+ "<link href=\"cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b\"/>"
+ "</entry>\n");
+
const string incompleteEntry("<entry xmlns=\"http://www.w3.org/2005/Atom\">\n"
"<title>item</title>"
"<content type=\"text/xml\">"
@@ -155,6 +166,12 @@ const bool testEntry() {
assert(str(os) == itemNoContentEntry);
}
{
+ const list<value> a = content(readATOMEntry(mklist(itemEmptyTitleEntry)));
+ ostringstream os;
+ writeATOMEntry<ostream*>(writer, &os, a);
+ assert(str(os) == itemEmptyTitleEntry);
+ }
+ {
const list<value> a = content(readATOMEntry(mklist(incompleteEntry)));
ostringstream os;
writeATOMEntry<ostream*>(writer, &os, a);