Mercurial > public > mercurial-scm > python-hglib
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-status.py Sun Aug 14 00:49:56 2011 +0300 @@ -0,0 +1,31 @@ +import common, os + +class test_status(common.basetest): + def test_empty(self): + d = dict((c, []) for c in 'MARC!?I') + self.assertEquals(self.client.status(), d) + + def test_one_of_each(self): + self.append('.hgignore', 'ignored') + self.append('ignored', 'a') + self.append('clean', 'a') + self.append('modified', 'a') + self.append('removed', 'a') + self.append('missing', 'a') + rev0 = self.client.commit('first', addremove=True) + self.append('modified', 'a') + self.append('added', 'a') + self.client.add(['added']) + os.remove('missing') + self.client.remove(['removed']) + self.append('untracked') + + d = {'M' : ['modified'], + 'A' : ['added'], + 'R' : ['removed'], + 'C' : ['.hgignore', 'clean'], + '!' : ['missing'], + '?' : ['untracked'], + 'I' : ['ignored']} + + self.assertEquals(self.client.status(all=True), d)