From 68e245b2c5d00977ef900689fa2933c03482c562 Mon Sep 17 00:00:00 2001 From: xml-project Date: Sun, 2 Feb 2025 12:26:46 +0100 Subject: [PATCH] Additional tests for c:data decoding --- test-suite/tests/ab-cast-content-type-029.xml | 48 +++++++++++++++++++ test-suite/tests/ab-cast-content-type-030.xml | 47 ++++++++++++++++++ test-suite/tests/ab-cast-content-type-031.xml | 48 +++++++++++++++++++ test-suite/tests/ab-cast-content-type-032.xml | 46 ++++++++++++++++++ test-suite/tests/ab-cast-content-type-033.xml | 36 ++++++++++++++ test-suite/tests/ab-cast-content-type-034.xml | 36 ++++++++++++++ test-suite/tests/ab-cast-content-type-035.xml | 36 ++++++++++++++ test-suite/tests/ab-cast-content-type-036.xml | 36 ++++++++++++++ 8 files changed, 333 insertions(+) create mode 100644 test-suite/tests/ab-cast-content-type-029.xml create mode 100644 test-suite/tests/ab-cast-content-type-030.xml create mode 100644 test-suite/tests/ab-cast-content-type-031.xml create mode 100644 test-suite/tests/ab-cast-content-type-032.xml create mode 100644 test-suite/tests/ab-cast-content-type-033.xml create mode 100644 test-suite/tests/ab-cast-content-type-034.xml create mode 100644 test-suite/tests/ab-cast-content-type-035.xml create mode 100644 test-suite/tests/ab-cast-content-type-036.xml diff --git a/test-suite/tests/ab-cast-content-type-029.xml b/test-suite/tests/ab-cast-content-type-029.xml new file mode 100644 index 00000000..3bf11f8f --- /dev/null +++ b/test-suite/tests/ab-cast-content-type-029.xml @@ -0,0 +1,48 @@ + + + + cast-content-type 029 (AB) + + + 2025-02-02 + + Achim Berndzen + + +

Test casting from c:data to Text.

+
+
+
+
+ +

Tests that a c:data document is decoded if cast to Text. Charset UTF-8

+
+ + + + + + Q29weSDCqQ== + + + + + + + + + + The root element is not 'result'. + The text is not correctly decoded. + + + + +
diff --git a/test-suite/tests/ab-cast-content-type-030.xml b/test-suite/tests/ab-cast-content-type-030.xml new file mode 100644 index 00000000..8df4f4a0 --- /dev/null +++ b/test-suite/tests/ab-cast-content-type-030.xml @@ -0,0 +1,47 @@ + + + + cast-content-type 030 (AB) + + + 2025-02-02 + + Achim Berndzen + + +

Test casting from c:data to Text.

+
+
+
+
+ +

Tests that a c:data document is decoded if cast to Text. Implicit charset

+
+ + + + + + Q29weSDCqQ== + + + + + + + + + + The root element is not 'result'. + The text is not correctly decoded. + + + + +
diff --git a/test-suite/tests/ab-cast-content-type-031.xml b/test-suite/tests/ab-cast-content-type-031.xml new file mode 100644 index 00000000..b90bc95b --- /dev/null +++ b/test-suite/tests/ab-cast-content-type-031.xml @@ -0,0 +1,48 @@ + + + + cast-content-type 031 (AB) + + + 2025-02-02 + + Achim Berndzen + + +

Test casting from c:data to Text.

+
+
+
+
+ +

Tests that a c:data document is decoded if cast to Text. ISO charset

+
+ + + + + + Q29weSCp + + + + + + + + + + The root element is not 'result'. + The text is not correctly decoded. + + + + +
diff --git a/test-suite/tests/ab-cast-content-type-032.xml b/test-suite/tests/ab-cast-content-type-032.xml new file mode 100644 index 00000000..de68dd53 --- /dev/null +++ b/test-suite/tests/ab-cast-content-type-032.xml @@ -0,0 +1,46 @@ + + + + cast-content-type 032 (AB) + + + 2025-02-02 + + Achim Berndzen + + +

Test casting from c:data to Text.

+
+
+
+
+ +

Tests that a c:data document is decoded if cast to Text, default encoding.

+
+ + + + + + Q29weSDCqQ== + + + + + + + + + + The root element is not 'result'. + The text is not correctly decoded. + + + + +
diff --git a/test-suite/tests/ab-cast-content-type-033.xml b/test-suite/tests/ab-cast-content-type-033.xml new file mode 100644 index 00000000..5d4486cf --- /dev/null +++ b/test-suite/tests/ab-cast-content-type-033.xml @@ -0,0 +1,36 @@ + + + + cast-content-type 033 (AB) + + + 2025-02-02 + + Achim Berndzen + + +

Test casting from c:data to Text.

+
+
+
+
+ +

Tests that a c:data document decoding raises error, if content-types are not equal.

+
+ + + + + + Q29weSDCqQ== + + + + + +
diff --git a/test-suite/tests/ab-cast-content-type-034.xml b/test-suite/tests/ab-cast-content-type-034.xml new file mode 100644 index 00000000..4920f80e --- /dev/null +++ b/test-suite/tests/ab-cast-content-type-034.xml @@ -0,0 +1,36 @@ + + + + cast-content-type 034 (AB) + + + 2025-02-02 + + Achim Berndzen + + +

Test casting from c:data to Text.

+
+
+
+
+ +

Tests that a c:data document decoding raises error, if encoding is unsupported.

+
+ + + + + + Q29weSDCqQ== + + + + + +
diff --git a/test-suite/tests/ab-cast-content-type-035.xml b/test-suite/tests/ab-cast-content-type-035.xml new file mode 100644 index 00000000..a85f7172 --- /dev/null +++ b/test-suite/tests/ab-cast-content-type-035.xml @@ -0,0 +1,36 @@ + + + + cast-content-type 035 (AB) + + + 2025-02-02 + + Achim Berndzen + + +

Test casting from c:data to Text.

+
+
+
+
+ +

Tests that a c:data document decoding raises error, if charset is unsupported.

+
+ + + + + + Q29weSDCqQ== + + + + + +
diff --git a/test-suite/tests/ab-cast-content-type-036.xml b/test-suite/tests/ab-cast-content-type-036.xml new file mode 100644 index 00000000..d3da4520 --- /dev/null +++ b/test-suite/tests/ab-cast-content-type-036.xml @@ -0,0 +1,36 @@ + + + + cast-content-type 036 (AB) + + + 2025-02-02 + + Achim Berndzen + + +

Test casting from c:data to Text.

+
+
+
+
+ +

Tests that a c:data document decoding raises error, no content-type on c:data.

+
+ + + + + + Q29weSDCqQ== + + + + + +