aboutsummaryrefslogtreecommitdiff
path: root/tests/xml01.at
diff options
context:
space:
mode:
Diffstat (limited to 'tests/xml01.at')
-rw-r--r--tests/xml01.at63
1 files changed, 63 insertions, 0 deletions
diff --git a/tests/xml01.at b/tests/xml01.at
new file mode 100644
index 0000000..01d7df4
--- /dev/null
+++ b/tests/xml01.at
@@ -0,0 +1,63 @@
+# This file is part of Eclat -*- Autotest -*-
+# Copyright (C) 2012 Sergey Poznyakoff
+#
+# Eclat is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Eclat is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Eclat. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([xml01])
+AT_KEYWORDS([xml xml01])
+
+AT_DATA([input],[<?xml version="1.0" encoding="UTF-8"?>
+<DescribeTagsResponse xmlns="http://ec2.amazonaws.com/doc/2012-08-15/">
+ <requestId>beefdead-57rt-ffea-e4ac-deadbeefbeef</requestId>
+ <tagSet>
+ <item>
+ <resourceId>i-00000000</resourceId>
+ <resourceType>instance</resourceType>
+ <key>foo</key>
+ <value>bar</value>
+ </item>
+ <item>
+ <resourceId>i-11111111</resourceId>
+ <resourceType>instance</resourceType>
+ <key>baz</key>
+ <value>quux</value>
+ </item>
+ <item>
+ <resourceId>i-22222222</resourceId>
+ <resourceType>instance</resourceType>
+ <key>Name</key>
+ <value>test</value>
+ </item>
+ </tagSet>
+</DescribeTagsResponse>
+])
+
+AT_CHECK([txml input],
+[0],
+[.DescribeTagsResponse.requestId: "beefdead-57rt-ffea-e4ac-deadbeefbeef"
+.DescribeTagsResponse.tagSet.item.resourceId: "i-00000000"
+.DescribeTagsResponse.tagSet.item.resourceType: "instance"
+.DescribeTagsResponse.tagSet.item.key: "foo"
+.DescribeTagsResponse.tagSet.item.value: "bar"
+.DescribeTagsResponse.tagSet.item.resourceId: "i-11111111"
+.DescribeTagsResponse.tagSet.item.resourceType: "instance"
+.DescribeTagsResponse.tagSet.item.key: "baz"
+.DescribeTagsResponse.tagSet.item.value: "quux"
+.DescribeTagsResponse.tagSet.item.resourceId: "i-22222222"
+.DescribeTagsResponse.tagSet.item.resourceType: "instance"
+.DescribeTagsResponse.tagSet.item.key: "Name"
+.DescribeTagsResponse.tagSet.item.value: "test"
+])
+
+AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.