about summary refs log tree commit diff stats
path: root/src/command/cmd_defs.h
Commit message (Expand)AuthorAgeFilesLines
* Add vim modelineMichael Vetter2019-11-131-0/+1
* Add 'save' command to save preferencesMichael Vetter2019-08-021-0/+1
* Update copyright to include 2019Michael Vetter2019-01-221-1/+1
* Update copyrightJames Booth2018-01-211-1/+1
* Allow search_any and search_all for helpJames Booth2017-04-071-1/+2
* Add basic help searchJames Booth2017-04-061-0/+2
* Update CopyrightJames Booth2017-01-281-1/+1
* Make header defines consistentJames Booth2016-07-241-2/+2
* Update GPL link in headersJames Booth2016-07-241-1/+1
* Remove unneeded functions from cmd headersJames Booth2016-05-231-1/+0
* Move functions from cmd_defs to cmd_funcsJames Booth2016-05-231-13/+3
* Fix command headersJames Booth2016-05-231-3/+3
* Rename command sourcesJames Booth2016-05-221-0/+63
22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# Copyright (C) 2009, 2010  Roman Zimbelmann <romanz@lavabit.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from unittest import TestCase, main

class Test(TestCase):
	def test_wrapper(self):
		from ranger.api.keys import Wrapper

		class dummyfm(object):
			def move(self, relative):
				return "I move down by {0}".format(relative)

		class commandarg(object):
			def __init__(self):
				self.fm = dummyfm()
				self.n = None
				self.direction = None

		arg = commandarg()

		do = Wrapper('fm')
		command = do.move(relative=4)

		self.assertEqual(command(arg), 'I move down by 4')

if __name__ == '__main__': main()