Mercurial > python-hglib
comparison tests/test-status.py @ 33:d74a5891d9d1
client: add missing options to status
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Sun, 14 Aug 2011 00:49:56 +0300 |
parents | |
children | f6e1d9a6e0cd |
comparison
equal
deleted
inserted
replaced
32:a2fc0a7f648e | 33:d74a5891d9d1 |
---|---|
1 import common, os | |
2 | |
3 class test_status(common.basetest): | |
4 def test_empty(self): | |
5 d = dict((c, []) for c in 'MARC!?I') | |
6 self.assertEquals(self.client.status(), d) | |
7 | |
8 def test_one_of_each(self): | |
9 self.append('.hgignore', 'ignored') | |
10 self.append('ignored', 'a') | |
11 self.append('clean', 'a') | |
12 self.append('modified', 'a') | |
13 self.append('removed', 'a') | |
14 self.append('missing', 'a') | |
15 rev0 = self.client.commit('first', addremove=True) | |
16 self.append('modified', 'a') | |
17 self.append('added', 'a') | |
18 self.client.add(['added']) | |
19 os.remove('missing') | |
20 self.client.remove(['removed']) | |
21 self.append('untracked') | |
22 | |
23 d = {'M' : ['modified'], | |
24 'A' : ['added'], | |
25 'R' : ['removed'], | |
26 'C' : ['.hgignore', 'clean'], | |
27 '!' : ['missing'], | |
28 '?' : ['untracked'], | |
29 'I' : ['ignored']} | |
30 | |
31 self.assertEquals(self.client.status(all=True), d) |