Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 3024 | Kartik K. Agaram | 2016-05-28 | 1 | -1/+1 |
| | |||||
* | 3023 | Kartik K. Agaram | 2016-05-28 | 1 | -1/+1 |
| | |||||
* | 3022 | Kartik K. Agaram | 2016-05-27 | 4 | -20/+79 |
| | | | | Clean up 3020. | ||||
* | 3021 | Kartik K. Agaram | 2016-05-27 | 4 | -101/+120 |
| | |||||
* | 3020 - names in chessboard tests | Kartik K. Agaram | 2016-05-26 | 3 | -96/+118 |
| | | | | | | | | Extremely ugly change. Also ended up fixing some places where I was mixing up sources and sinks. But I'm not going to bother updating edit/ and sandbox/ apps. Just too many scenarios to clean up. | ||||
* | 3018 | Kartik K. Agaram | 2016-05-26 | 1 | -5/+2 |
| | |||||
* | 3017 | Kartik K. Agaram | 2016-05-26 | 8 | -648/+696 |
| | |||||
* | 3016 | Kartik K. Agaram | 2016-05-26 | 1 | -2/+2 |
| | |||||
* | 3015 - more symbolic names in tests | Kartik K. Agaram | 2016-05-26 | 7 | -521/+569 |
| | | | | | | There's still a problem: if I ever want to use any of the special scenario variables like 'screen', 'console', etc., then I can't use 'local-scope' in my scenario. | ||||
* | 3014 | Kartik K. Agaram | 2016-05-26 | 1 | -126/+126 |
| | | | | | Tests are clearer if memory locations look different from other literal values. | ||||
* | 3013 | Kartik K. Agaram | 2016-05-26 | 12 | -342/+356 |
| | |||||
* | 3012 | Kartik K. Agaram | 2016-05-26 | 1 | -209/+255 |
| | | | | Clean up old tests after https://news.ycombinator.com/item?id=11779013 | ||||
* | 3011 | Kartik K. Agaram | 2016-05-25 | 1 | -0/+0 |
| | |||||
* | 3010 | Kartik K. Agaram | 2016-05-25 | 1 | -2/+2 |
| | | | | | | | | | | insert_container is getting pretty gnarly. It's spread across two layers (containers and shape-shifting containers), and since it has to deal with extending existing containers it's coiled in on itself, constantly reading and writing the Type table. Maybe I should uncoil the case of extending a container and make it separate from defining a new container. | ||||
* | 3009 | Kartik K. Agaram | 2016-05-25 | 1 | -2/+6 |
| | |||||
* | 3008 | Kartik K. Agaram | 2016-05-25 | 2 | -5/+5 |
| | |||||
* | 3007 - warn on unused result in 'not' | Kartik K. Agaram | 2016-05-25 | 1 | -2/+2 |
| | |||||
* | 3006 | Kartik K. Agaram | 2016-05-24 | 2 | -8/+9 |
| | |||||
* | 3005 | Kartik K. Agaram | 2016-05-24 | 1 | -32/+0 |
| | | | | | | Drop those tests now that we've confirmed over the last few commits that they work. The new test introduced in the bugfix of commit 3003 takes over their duties. | ||||
* | 3004 - print non-integers correctly | Kartik K. Agaram | 2016-05-24 | 1 | -74/+27 |
| | | | | | | Thanks Caleb Couch for finding this hole, and for noticing that it made a bug in binary-search harder to find. For now we'll just rely on the host's support for printing floating-point. | ||||
* | 3003 | Kartik K. Agaram | 2016-05-24 | 2 | -2/+32 |
| | | | | | | Bugfix: overriding a primitive recipe with a generic variant that takes an address of something shouldn't mask the primitive when you call it with literal 0. | ||||
* | 3002 | Kartik K. Agaram | 2016-05-24 | 1 | -0/+1 |
| | |||||
* | 3001 | Kartik K. Agaram | 2016-05-24 | 3 | -11/+18 |
| | |||||
* | 3000 | Kartik K. Agaram | 2016-05-24 | 1 | -1/+1 |
| | |||||
* | 2999 | Kartik K. Agaram | 2016-05-24 | 1 | -2/+2 |
| | |||||
* | 2998 | Kartik K. Agaram | 2016-05-24 | 2 | -4/+8 |
| | |||||
* | 2997 - new version of http://akkartik.name/about | Kartik K. Agaram | 2016-05-23 | 2 | -7/+7 |
| | |||||
* | 2996 | Kartik K. Agaram | 2016-05-21 | 77 | -2858/+5390 |
| | |||||
* | 2995 | Kartik K. Agaram | 2016-05-21 | 1 | -0/+15 |
| | |||||
* | 2994 | Kartik K. Agaram | 2016-05-21 | 1 | -1/+1 |
| | |||||
* | 2993 - mutable check for pass-by-value containers | Kartik K. Agaram | 2016-05-21 | 1 | -4/+23 |
| | | | | This fixes all known holes in the immutability checker. | ||||
* | 2992 | Kartik K. Agaram | 2016-05-20 | 3 | -1/+29 |
| | | | | | Raise an error if a 'put' or 'put-index' doesn't match ingredient and product. That wouldn't do what you would expect. | ||||
* | 2991 | Kartik K. Agaram | 2016-05-20 | 3 | -7/+7 |
| | | | | | Never mind, always quote direct quotes from code in error messages. Dilated reagents are the uncommon case. | ||||
* | 2990 | Kartik K. Agaram | 2016-05-20 | 44 | -291/+281 |
| | | | | | | | | | | Standardize quotes around reagents in error messages. I'm still sure there's issues. For example, the messages when type-checking 'copy'. I'm not putting quotes around them because in layer 60 I end up creating dilated reagents, and then it's a bit much to have quotes and (two kinds of) brackets. But I'm sure I'm doing that somewhere.. | ||||
* | 2988 - bring back immutability checks | Kartik K. Agaram | 2016-05-20 | 1 | -0/+544 |
| | | | | | | These were dropped back in commit 2858 (Apr 23). There are still holes in immmutability checking, this just brings us back to parity while using put/put-index instead of get-address/index-address. | ||||
* | 2987 | Kartik K. Agaram | 2016-05-20 | 7 | -0/+0 |
| | |||||
* | 2986 - new example: the 8-queens problem | Kartik K. Agaram | 2016-05-20 | 2 | -0/+100 |
| | | | | Just playing around with edit/ and trying to find bugs. | ||||
* | 2985 - allow multiple pointers within lists | Kartik K. Agaram | 2016-05-20 | 1 | -3/+2 |
| | | | | | | | | | | Earlier, this wasn't legal: y:address:list:number <- push 34, x:address:list:number (So that x and y would point to different places in the list.) However, functional code relies on this ability a lot. | ||||
* | 2984 | Kartik K. Agaram | 2016-05-19 | 1 | -0/+272 |
| | | | | Missed a file. | ||||
* | 2983 - migrate buttons over to sandbox/ | Kartik K. Agaram | 2016-05-19 | 14 | -384/+366 |
| | |||||
* | 2982 | Kartik K. Agaram | 2016-05-1class="n">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() |