about summary refs log tree commit diff stats
path: root/src/ui/core.c
Commit message (Expand)AuthorAgeFilesLines
* Change ui_win_has_attention() logicMichael Vetter2021-05-311-3/+5
* Attention flag - Implemented Alt+mDebXWoody2021-05-291-0/+12
* Have separate settings for intypeMichael Vetter2021-05-081-7/+11
* Update ui_ask_password to support confirmationThorben Günther2021-03-111-2/+6
* Draw wintitle using fputs and fprintf instead of /bin/echo.Akce2021-02-281-25/+8
* Declare counter var inside loopMichael Vetter2020-11-091-2/+1
* Basic support for building on NetBSD.nia2020-09-041-0/+2
* Dont hilight console once all messages have been readMichael Vetter2020-07-091-0/+1
* Apply coding styleMichael Vetter2020-07-071-174/+173
* Revert "Apply coding style"Michael Vetter2020-07-071-183/+184
* Apply coding styleMichael Vetter2020-07-071-184/+183
* Remove prefs_free_string()Michael Vetter2020-07-021-2/+2
* ui_room_join() dont get nick twiceMichael Vetter2020-04-201-1/+0
* Allow utf8 symbols as omemo/pgp/otr indicator charMichael Vetter2020-02-201-34/+34
* Change theme handlingMichael Vetter2020-01-291-1/+1
* separator: Enable for MUC and PRIVWIN tooMichael Vetter2019-12-131-9/+26
* Initial work on last-read-position featureMichael Vetter2019-12-131-0/+8
* Dont print error message if a valid setting function is calledMichael Vetter2019-12-121-1/+0
* Add vim modelineMichael Vetter2019-11-131-0/+1
* Reduce scope of num in ui_print_system_msg_from_recipient()Michael Vetter2019-07-221-3/+1
* Add OMEMO policyPaul Fariello2019-04-171-1/+1
* Fix use after free bugDavid Baer2019-03-221-5/+5
* Update copyright to include 2019Michael Vetter2019-01-221-1/+1
* Rename mucconf wins into conf winsPaul Fariello2018-09-051-10/+10
* Use jid prefs in statusbarJames Booth2018-03-101-2/+2
* WIP add self prefs for statusbarJames Booth2018-03-101-10/+6
* Add preferences for tab displayJames Booth2018-03-091-10/+14
* Show name in statusbar tabs WIPJames Booth2018-03-081-9/+11
* Add time to status barJames Booth2018-03-071-1/+2
* Update copyrightJames Booth2018-01-211-1/+1
* Update CopyrightJames Booth2017-01-281-1/+1
* Check roster contact before displayng typing notificationJames Booth2017-01-231-2/+6
* Allow clearing account resourceJames Booth2016-11-221-5/+1
* Remove unused functionsJames Booth2016-10-161-18/+0
* Remove ui_current_print_formatted_lineJames Booth2016-10-161-13/+0
* Remove ui_current_print_lineJames Booth2016-10-161-14/+1
* Add win_appendJames Booth2016-10-151-2/+2
* Add win_appendlnJames Booth2016-10-151-3/+2
* Add win_printJames Booth2016-10-151-35/+35
* Remove ui_current_error_lineJames Booth2016-10-151-7/+0
* Remove ui_win_error_lineJames Booth2016-10-151-6/+0
* Use win_printf_line instead of win_printlnJames Booth2016-10-151-3/+3
* Use win_printf_line where appropriateJames Booth2016-10-151-23/+23
* Add ch arg to win_printf_lineJames Booth2016-10-151-12/+12
* Add win_printf_lineJames Booth2016-10-141-9/+9
* Always use string format in win_printfJames Booth2016-10-121-7/+7
* Remove win_print, use win_printf insteadJames Booth2016-10-111-15/+15
* Rename win_vprint -> win_printfJames Booth2016-10-111-23/+23
* Allow vertical positioning of all windowsJames Booth2016-09-231-1/+1
* Rename /titlebar -> /wintitleJames Booth2016-09-221-1/+1
class="mi">2,3,1,2,3,1,2,3,2,3,2,1])) self.assertEqual( [1,[2,3]], u([1,[2,3],1,[2,3],[2,3],1,[2,3],1,[2,3],[2,3],1])) def test_unique_keeps_type(self): def u(x): return unique(x) self.assertEqual( [1,2,3], u([1,2,3,1])) self.assertEqual( (1,2,3), u((1,2,3,1))) self.assertEqual( set((1,2,3)), u(set((1,2,3,1)))) self.assertEqual( deque((1,2,3)), u(deque((1,2,3,1)))) def test_mount_path(self): # assuming ismount() is used def my_ismount(path): depth = path.count('/') if path.startswith('/media'): return depth == 0 or depth == 2 return depth <= 1 from ranger.ext import mount_path original_ismount = mount_path.ismount mount_path.ismount = my_ismount try: mp = mount_path.mount_path self.assertEqual('/home', mp('/home/hut/porn/bondage')) self.assertEqual('/', mp('/')) self.assertEqual('/media/sdb1', mp('/media/sdb1/foo/bar')) self.assertEqual('/media/sdc2', mp('/media/sdc2/a/b/c/d/e')) finally: mount_path.ismount = original_ismount # TODO: links are not tested but I don't see how its possible # without messing around with mounts. # self.assertEqual('/media/foo', # mount_path('/media/bar/some_link_to_a_foo_subdirectory')) def test_openstruct(self): from ranger.ext.openstruct import OpenStruct from random import randint, choice from string import ascii_letters os = OpenStruct(a='a') self.assertEqual(os.a, 'a') self.assertRaises(AttributeError, getattr, os, 'b') dictionary = {'foo': 'bar', 'zoo': 'zar'} os = OpenStruct(dictionary) self.assertEqual(os.foo, 'bar') self.assertEqual(os.zoo, 'zar') self.assertRaises(AttributeError, getattr, os, 'sdklfj') for i in range(100): attr_name = ''.join(choice(ascii_letters) \ for x in range(randint(3,9))) value = randint(100,999) if not attr_name in os: self.assertRaises(AttributeError, getattr, os, attr_name) setattr(os, attr_name, value) value2 = randint(100,999) setattr(os, attr_name, value2) self.assertEqual(value2, getattr(os, attr_name)) def test_shell_escape(self): from ranger.ext.shell_escape import shell_escape, shell_quote self.assertEqual(r"'luigi'\''s pizza'", shell_quote("luigi's pizza")) self.assertEqual(r"luigi\'s\ pizza", shell_escape("luigi's pizza")) self.assertEqual(r"\$lol/foo\\xyz\|\>\<\]\[", shell_escape(r"$lol/foo\xyz|><][")) if __name__ == '__main__': unittest.main()