Commits

Jan Willems committed 283407b

Added hg_addremove tests.

Comments (0)

Files changed (2)

 
  hg init
  hg id
- hg add <file>
+ hg add [<file>]
+ hg addremove [<file>]
  hg commit [files] [-u name] [--close-branch]
  hg update <rev>
  hg heads
  hg tag
  hg tags
  hg diff
+ hg
  hg version
  hg clone
  hg move

hgapi/testhgapi.py

         diffs = self.repo.hg_diff()
         self.assertTrue(diffs[0]['filename'] == 'destination.txt')
         self.assertTrue(diffs[1]['filename'] == 'source.txt')
+        self.repo.hg_commit("Checked move.")
+
+    def test_280_AddRemove(self):
+        os.remove("test/foo.txt")
+        with open("test/fizz.txt", "w") as out:
+            out.write("fuzz")
+        self.repo.hg_addremove()
+        self.assertListEqual(self.repo.hg_status()['A'], ['fizz.txt'])
+        self.assertListEqual(self.repo.hg_status()['R'], ['foo.txt'])
 
     def test_400_version(self):
         self.assertNotEquals(hgapi.Repo.hg_version(), "")