diff options
author | hut <hut@lavabit.com> | 2010-02-19 00:39:18 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-03-09 14:40:23 +0100 |
commit | 09d8404c62454a08dffc99d0a79d46ac51d8aab5 (patch) | |
tree | 830c61f908a251c1ebe20ea02473e8a734ffa402 /test | |
parent | 06152bdc5e20cbece35dd4709509b0bf024b428d (diff) | |
download | ranger-09d8404c62454a08dffc99d0a79d46ac51d8aab5.tar.gz |
keyparser: lots of stuff
Diffstat (limited to 'test')
-rw-r--r-- | test/tc_newkeys.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/tc_newkeys.py b/test/tc_newkeys.py index 45ac4e33..a4d69805 100644 --- a/test/tc_newkeys.py +++ b/test/tc_newkeys.py @@ -51,7 +51,7 @@ class Test(PressTestCase): return fnc km.map('ppp', n(5)) - km.map('pp<psv>', n(8)) + km.map('pp<bg>', n(8)) km.map('pp<dir>', n(2)) directions.map('j', dir=Direction(down=1)) @@ -116,6 +116,7 @@ class Test(PressTestCase): directions.map('j', dir=Direction(down=1)) directions.map('k', dir=Direction(down=-1)) directions.map('<CR>', alias='j') + directions.map('@', alias='<CR>') base = KeyMap() base.map('a<dir>', add_dirs) @@ -130,7 +131,7 @@ class Test(PressTestCase): other.map('c<dir>', add_dirs) other.map('g', alias='f') - km = base.merge(other) + km = base.merge(other, copy=True) kb = KeyBuffer(km, directions) press = self._mkpress(kb, km) @@ -142,6 +143,9 @@ class Test(PressTestCase): self.assertEqual(5, press('f')) self.assertEqual(5, press('g')) + self.assertEqual(press('c<CR>'), press('c@')) + self.assertEqual(press('c<CR>'), press('c@')) + self.assertEqual(press('c<CR>'), press('c@')) for n in range(1, 50): self.assertPressIncomplete(kb, 'y' * n) @@ -205,19 +209,19 @@ class Test(PressTestCase): # test 1 t = Tree('a') u = Tree('b') - merged = t.merge(u) + merged = t.merge(u, copy=True) self.assertEqual('b', merged._tree) # test 2 t = Tree('a') u = makeTreeA() - merged = t.merge(u) + merged = t.merge(u, copy=True) self.assertEqual(u._tree, merged._tree) # test 3 t = makeTreeA() u = makeTreeB() - v = t.merge(u) + v = t.merge(u, copy=True) self.assertEqual(0, v['aaaX']) self.assertEqual(2, v['aaaY']) |