summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-17 19:35:15 +0100
committerhut <hut@lavabit.com>2009-12-17 19:35:15 +0100
commit3dbefa71785bf61b8f28d4a780064f3f4e04dcb5 (patch)
treed2272b52303287ece416c33d568d24f15234ff84 /test
parent16246965082ce5d319f5cef07da3ff533ca50cc2 (diff)
downloadranger-3dbefa71785bf61b8f28d4a780064f3f4e04dcb5.tar.gz
extended history by a couple of methods
Diffstat (limited to 'test')
-rw-r--r--test/tc_history.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/tc_history.py b/test/tc_history.py
index e3377532..18f71e35 100644
--- a/test/tc_history.py
+++ b/test/tc_history.py
@@ -13,23 +13,26 @@ class Test(TestCase):
 
 		hist.back()
 
-		self.assertEqual(4, hist.top())
+		self.assertEqual(4, hist.current())
 		self.assertEqual([3,4], list(hist))
 
+		self.assertEqual(5, hist.top())
+
 		hist.back()
-		self.assertEqual(3, hist.top())
+		self.assertEqual(3, hist.current())
 		self.assertEqual([3], list(hist))
 
-		# no change if top == bottom
-		self.assertEqual(hist.top(), hist.bottom())
-		last_top = hist.top()
+		# no change if current == bottom
+		self.assertEqual(hist.current(), hist.bottom())
+		last = hist.current()
 		hist.back()
-		self.assertEqual(hist.top(), last_top)
+		self.assertEqual(hist.current(), last)
 
+		self.assertEqual(5, hist.top())
 
 		hist.forward()
 		hist.forward()
-		self.assertEqual(5, hist.top())
+		self.assertEqual(5, hist.current())
 		self.assertEqual([3,4,5], list(hist))