comparison tests/test-bookmarks.py @ 24:ca0d7e212cf8

client: add bookmarks command
author Idan Kamara <idankk86@gmail.com>
date Thu, 11 Aug 2011 17:54:09 +0300
parents
children 5fe53db61aa4
comparison
equal deleted inserted replaced
23:223e463c25e0 24:ca0d7e212cf8
1 import common
2
3 class test_bookmarks(common.basetest):
4 def test_empty(self):
5 self.assertEquals(self.client.bookmarks(), ([], -1))
6
7 def test_basic(self):
8 self.append('a', 'a')
9 rev0, node0 = self.client.commit('first', addremove=True)
10 self.append('a', 'a')
11 rev1, node1 = self.client.commit('second')
12
13 self.client.bookmark('0', rev0)
14 self.assertEquals(self.client.bookmarks(),
15 ([('0', rev0, node0[:12])], -1))
16
17 self.client.bookmark('1', rev1)
18 self.assertEquals(self.client.bookmarks(),
19 ([('0', rev0, node0[:12]),
20 ('1', rev1, node1[:12])], 1))
21
22 #def test_spaces(self):
23 # self.client.bookmark('s pace', self.rev0)
24 # self.assertEquals(self.client.bookmarks(),
25 # ([('s pace', 0, self.rev0.node[:12])], -1))