summaryrefslogtreecommitdiffstats
path: root/tests/fail
diff options
context:
space:
mode:
authorDavid Nickel <dnickel@us.ibm.com>2015-06-22 12:00:47 -0500
committerDavid Nickel <dnickel@us.ibm.com>2015-06-22 12:00:47 -0500
commit7f72a2e3e07458f64b06f2c8e16ee07d309cc184 (patch)
tree193cb4f0b748098fba4eaa2946556ca4e854d740 /tests/fail
parentc05e8e75b4d7aa8c4485f5f02028ac4b3bc56f8d (diff)
downloadvpdtools-7f72a2e3e07458f64b06f2c8e16ee07d309cc184.tar.gz
vpdtools-7f72a2e3e07458f64b06f2c8e16ee07d309cc184.zip
Added size checking and appropriate test cases
Diffstat (limited to 'tests/fail')
-rw-r--r--tests/fail/sizetoobig/sizetoobig.tvpd27
-rw-r--r--tests/fail/sizetoobig/sizetoobig.tvpd~27
2 files changed, 54 insertions, 0 deletions
diff --git a/tests/fail/sizetoobig/sizetoobig.tvpd b/tests/fail/sizetoobig/sizetoobig.tvpd
new file mode 100644
index 0000000..f1e9479
--- /dev/null
+++ b/tests/fail/sizetoobig/sizetoobig.tvpd
@@ -0,0 +1,27 @@
+<?xml version='1.0' encoding='utf-8'?>
+<vpd>
+ <name>FILENAME</name>
+ <size>8kb</size>
+ <VD>01</VD>
+ <record name="VINI">
+ <rdesc>The VINI record</rdesc>
+ <keyword name="RT">
+ <kwdesc>The Record Type keyword</kwdesc>
+ <kwformat>ascii</kwformat>
+ <kwlen>4</kwlen>
+ <kwdata>VINI</kwdata>
+ </keyword>
+ <keyword name="#S">
+ <kwdesc>The ascii keyword</kwdesc>
+ <kwformat>ascii</kwformat>
+ <kwlen>20000</kwlen>
+ <kwdata>This is text data</kwdata>
+ </keyword>
+ <keyword name="HX">
+ <kwdesc>The Hex keyword</kwdesc>
+ <kwformat>hex</kwformat>
+ <kwlen>4</kwlen>
+ <kwdata>00000000</kwdata>
+ </keyword>
+ </record>
+</vpd>
diff --git a/tests/fail/sizetoobig/sizetoobig.tvpd~ b/tests/fail/sizetoobig/sizetoobig.tvpd~
new file mode 100644
index 0000000..3edd68c
--- /dev/null
+++ b/tests/fail/sizetoobig/sizetoobig.tvpd~
@@ -0,0 +1,27 @@
+<?xml version='1.0' encoding='utf-8'?>
+<vpd>
+ <name>FILENAME</name>
+ <size>16kb</size>
+ <VD>01</VD>
+ <record name="VINI">
+ <rdesc>The VINI record</rdesc>
+ <keyword name="RT">
+ <kwdesc>The Record Type keyword</kwdesc>
+ <kwformat>ascii</kwformat>
+ <kwlen>4</kwlen>
+ <kwdata>VINI</kwdata>
+ </keyword>
+ <keyword name="AS">
+ <kwdesc>The ascii keyword</kwdesc>
+ <kwformat>ascii</kwformat>
+ <kwlen>20</kwlen>
+ <kwdata>This is text data</kwdata>
+ </keyword>
+ <keyword name="HX">
+ <kwdesc>The Hex keyword</kwdesc>
+ <kwformat>hex</kwformat>
+ <kwlen>4</kwlen>
+ <kwdata>00000000</kwdata>
+ </keyword>
+ </record>
+</vpd>
OpenPOWER on IntegriCloud