From 7374c70a39b9e0b0c5449d7d91d0f1978a44b0dc Mon Sep 17 00:00:00 2001
From: Graham McVicker <mcvicker@sanger.ac.uk>
Date: Tue, 17 Feb 2004 17:53:39 +0000
Subject: [PATCH] added test for the consistancy of display_id of Bio::Seq
 returned by Exon::seq

---
 modules/t/exon.t | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/modules/t/exon.t b/modules/t/exon.t
index b358c2119e..88abfb9a1b 100644
--- a/modules/t/exon.t
+++ b/modules/t/exon.t
@@ -3,7 +3,7 @@ use strict;
 
 BEGIN { $| = 1;
 	use Test ;
-	plan tests => 22;
+	plan tests => 24;
 }
 
 my $loaded = 0;
@@ -167,3 +167,14 @@ ok($hashkey eq $exon->slice->name . '-' . $exon->start . '-' .
 
 $multi->restore();
 
+
+# regression test
+# make sure that sequence fetching and caching is not broken
+$exon->stable_id('TestID');
+my $first_seq = $exon->seq();
+my $second_seq = $exon->seq();
+
+ok($first_seq->seq() && $first_seq->seq() eq $second_seq->seq());
+ok($first_seq->display_id()  && $first_seq->display_id() eq $second_seq->display_id());
+
+
-- 
GitLab