Index: trunk/PS-IPP-Metadata-Config/t/02_examples.t
===================================================================
--- trunk/PS-IPP-Metadata-Config/t/02_examples.t	(revision 3482)
+++ trunk/PS-IPP-Metadata-Config/t/02_examples.t	(revision 3487)
@@ -3,5 +3,5 @@
 # Copyright (C) 2005  Joshua Hoblitt
 #
-# $Id: 02_examples.t,v 1.2 2005-03-23 06:48:04 jhoblitt Exp $
+# $Id: 02_examples.t,v 1.3 2005-03-24 00:13:02 jhoblitt Exp $
 
 use strict;
@@ -12,5 +12,5 @@
 #$::RD_TRACE = 1;
 
-use Test::More tests => 3;
+use Test::More tests => 5;
 use PS::IPP::Metadata::Config;
 
@@ -106,4 +106,92 @@
             value   => 'key',
         },
+    ];
+
+    is_deeply( $config, $tree, "SDRS example structure, no overwrite" );
+}
+
+{
+my $example = q{
+Double     F64     1.23456789      # This is a comment
+Float    F32 0.98765#This is a comment too
+String  STR This is the string that forms the value #comment
+
+ # This is a comment line and is to be ignored
+boolean     BOOL    T # The value of `boolean' is `true'
+ 
+@primes U8  2,3 5 7,11,13 17 #   These are prime numbers
+
+comment MULTI # The rest of this line is ignored, but `comment' is set to be non-unique
+comment STR This
+comment STR     is
+comment STR       a
+comment STR        non-unique
+comment STR                  key
+Float F64 1.23456 # This generates a warning, and, if `overwrite' is `false', is ignored
+};
+    $config_parser->overwrite( 1 );
+    my $config = $config_parser->parse( $example );
+
+    ok( defined( $config ), "SDRS example parsed");
+
+    my $tree = [
+        {
+            name    => 'Double',
+            class   => 'scalar',
+            type    => 'F64',
+            value   => '1.23456789',
+            comment => 'This is a comment',
+        },
+        {
+            name    => 'String',
+            class   => 'scalar',
+            type    => 'STR',
+            value   => 'This is the string that forms the value',
+            comment => 'comment',
+        },
+        {
+            name    => 'boolean',
+            class   => 'scalar',
+            type    => 'BOOL',
+            value   => 1,
+            comment => q{The value of `boolean' is `true'},
+        },
+        {
+            name    => 'primes',
+            class   => 'vector',
+            type    => 'U8',
+            value   => [qw( 2 3 5 7 11 13 17 )],
+            comment => 'These are prime numbers',
+        },
+        {
+            name    => 'comment',
+            class   => 'scalar',
+            type    => 'STR',
+            value   => 'This',
+        },
+        {
+            name    => 'comment',
+            class   => 'scalar',
+            type    => 'STR',
+            value   => 'is',
+        },
+        {
+            name    => 'comment',
+            class   => 'scalar',
+            type    => 'STR',
+            value   => 'a',
+        },
+        {
+            name    => 'comment',
+            class   => 'scalar',
+            type    => 'STR',
+            value   => 'non-unique',
+        },
+        {
+            name    => 'comment',
+            class   => 'scalar',
+            type    => 'STR',
+            value   => 'key',
+        },
         {
             name    => 'Float',
@@ -115,5 +203,5 @@
     ];
 
-    is_deeply( $config, $tree, "SDRS example structure" );
+    is_deeply( $config, $tree, "SDRS example structure, with overwrite" );
 }
 
