From 1c25d3edbe51dbe8fb00c334f72c14862b42bf8e Mon Sep 17 00:00:00 2001
From: Don Armstrong <don@donarmstrong.com>
Date: Thu, 18 Jun 2009 20:16:06 -0700
Subject: [PATCH] add split_status tests in 03_status

---
 t/03_status.t | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 t/03_status.t

diff --git a/t/03_status.t b/t/03_status.t
new file mode 100644
index 00000000..eec2d54a
--- /dev/null
+++ b/t/03_status.t
@@ -0,0 +1,34 @@
+# -*- mode: cperl;-*-
+
+use Test::More tests => 6;
+
+use warnings;
+use strict;
+
+use utf8;
+use Encode;
+
+use_ok('Debbugs::Status');
+
+my $data = {package => 'foo, bar, baz',
+	    blocks  => '1 2 3',
+	    blockedby => '',
+	    tags      => 'foo, bar  , baz',
+	   };
+
+my @temp = Debbugs::Status::split_status_fields($data);
+is_deeply($temp[0]{package},[qw(foo bar baz)],
+	  'split_status_fields splits packages properly',
+	 );
+is_deeply($temp[0]{blocks},[qw(1 2 3)],
+	  'split_status_fields splits blocks properly',
+	 );
+is_deeply($temp[0]{blockedby},[],
+	  'split_status_fields handles empty fields properly',
+	 );
+is_deeply($temp[0]{tags},[qw(foo bar baz)],
+	  'split_status_fields splits tags properly',
+	 );
+my $temp = Debbugs::Status::split_status_fields($data);
+is_deeply(Debbugs::Status::split_status_fields($temp),$temp,
+	  'recursively calling split_status_fields returns the same thing');
-- 
2.39.5