diff options
author | hut <hut@lavabit.com> | 2010-01-14 00:20:34 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-01-14 00:20:34 +0100 |
commit | 11ff42afa10b6335b7cf421e0c8bb645ae6840b4 (patch) | |
tree | 6d9ac910d89b8b770bbb7c78dea3ee640f33ef6e | |
parent | 0bc410c523f397f9c46c04ded5b3da1da65a6242 (diff) | |
download | ranger-11ff42afa10b6335b7cf421e0c8bb645ae6840b4.tar.gz |
commandlist: bugfix
-rw-r--r-- | ranger/container/commandlist.py | 1 | ||||
-rw-r--r-- | test/tc_commandlist.py | 11 |
2 files changed, 7 insertions, 5 deletions
diff --git a/ranger/container/commandlist.py b/ranger/container/commandlist.py index 302564c9..95a9c1b6 100644 --- a/ranger/container/commandlist.py +++ b/ranger/container/commandlist.py @@ -134,6 +134,7 @@ class CommandList(object): obj = AliasedCommand(_make_getter(self.paths, existing), new) + self.commandlist.append(obj) for key in new: self.paths[key] = obj diff --git a/test/tc_commandlist.py b/test/tc_commandlist.py index f1edfa20..f00805e8 100644 --- a/test/tc_commandlist.py +++ b/test/tc_commandlist.py @@ -53,21 +53,22 @@ class Test(TestCase): self.assertEqual(fnc, cl['aaaa'].execute) # ------------------------ test aliases - cl.alias('aaaa', 'c') + cl.alias('aaaa', 'cc') cl.rebuild_paths() - self.assertEqual(cl['c'].execute, cl['aaaa'].execute) + self.assertEqual(dmy, cl['c']) + self.assertEqual(cl['cc'].execute, cl['aaaa'].execute) cl.bind(fnc2, 'aaaa') cl.rebuild_paths() - self.assertEqual(cl['c'].execute, cl['aaaa'].execute) + self.assertEqual(cl['cc'].execute, cl['aaaa'].execute) - cl.unbind('c') + cl.unbind('cc') cl.rebuild_paths() self.assertEqual(fnc2, cl['aaaa'].execute) - self.assertKeyError(cl, 'c') + self.assertKeyError(cl, 'cc') # ----------------------- test clearing cl.clear() |