about summary refs log tree commit diff stats
path: root/.travis.yml
Commit message (Expand)AuthorAgeFilesLines
* Add gtk to travis buildJames Booth2017-03-251-1/+1
* Update travis build otr dependencyJames Booth2017-03-251-1/+1
* Update travis build distroJames Booth2017-03-251-0/+2
* Add travis build scriptJames Booth2016-09-031-2/+1
* Removed lua and ruby from .travis.ymlJames Booth2016-03-101-2/+1
* Added python plugins codeJames Booth2016-02-241-3/+3
* Added C plugin code from plugins branchJames Booth2016-02-141-1/+2
* Doubled expect timeout for connect in tests, removed libuuid from travis buildJames Booth2015-10-131-1/+1
* Fixed travis buildJames Booth2015-09-241-1/+0
* Fix travis buildJames Booth2015-09-221-0/+1
* Fix travis buildJames Booth2015-09-211-1/+1
* Check for libmesode, fall back to libstropheJames Booth2015-09-211-3/+3
* Merge branch 'master' into openpgpJames Booth2015-06-141-1/+0
|\
| * Removed test output from travis buildJames Booth2015-06-141-1/+0
* | Merge branch 'master' into openpgpJames Booth2015-06-141-0/+1
|\|
| * Travis build fixJames Booth2015-06-131-1/+2
| * Output test log in travis buildJames Booth2015-06-131-1/+1
* | Merge branch 'master' into openpgpJames Booth2015-06-051-1/+12
|\|
| * Added microhttpd dependency for stabberJames Booth2015-05-311-0/+1
| * Expect header checkJames Booth2015-05-261-1/+1
| * Attempt to fix expect travis buildJames Booth2015-05-261-1/+3
| * Updated travis build for libexpectJames Booth2015-05-261-1/+1
| * Updated travis build, make stabber dependencyJames Booth2015-05-171-0/+8
* | Merge branch 'master' into pgpJames Booth2015-04-121-1/+1
|\|
| * Updated travis build to include uuid-dev dependencyJames Booth2015-04-121-1/+1
* | Added pgp key list commandJames Booth2015-03-221-1/+1
|/
* Updated .travis.yml to use cmocka-1.0.0James Booth2015-02-231-4/+4
* travis: added m4 dir for libstropheJames Booth2014-09-301-0/+1
* Revert "Fix travis build by adding m4 dir"James Booth2014-09-301-1/+0
* Fix travis build by adding m4 dirJames Booth2014-09-301-0/+1
* Added prefix to travis libstrophe configureJames Booth2014-09-171-1/+1
* Revert "Added --prefix=/usr to libstrophe build in travis config"James Booth2014-09-071-1/+1
* Added --prefix=/usr to libstrophe build in travis configJames Booth2014-09-061-1/+1
* Use public domain SHA1 code, remove libgcrypt dependencyJames Booth2014-06-011-1/+1
* Fixed tests to work with cmocka 0.4.1James Booth2014-05-261-4/+4
* Added libgcrypt dependencies to travis buildJames Booth2014-05-211-1/+1
* Removed redundant bootstrap call for travis buildJames Booth2014-02-231-1/+0
* Added cmocka to travis buildJames Booth2014-02-231-0/+10
* Added custom script to travis buildJames Booth2014-02-231-0/+1
* Changed travis libotr dependencyJames Booth2014-02-231-1/+1
* Added dependencies to travis buildJames Booth2014-02-231-1/+13
* Added bootstrap.sh to travis buildJames Booth2014-02-231-0/+1
* Added travis configJames Booth2014-02-231-0/+1
elf): def u(x): return list(unique(x)) self.assertEqual( [1,2,3], u([1,2,3])) self.assertEqual( [1,2,3], u([1,2,3,2,1])) self.assertEqual( [1,2,3], u([1,2,3,1,2,3,2,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()