| 
									
										
										
										
											2009-05-10 19:06:28 -04:00
										 |  |  | ! Copyright (C) 2009 Bruno Deferrari | 
					
						
							|  |  |  | ! See http://factorcode.org/license.txt for BSD license. | 
					
						
							|  |  |  | USING: tools.test redis.response-parser io.streams.string ;
 | 
					
						
							|  |  |  | IN: redis.response-parser.tests | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-03 12:39:59 -04:00
										 |  |  | { 1 } [ ":1\r\n" [ read-response ] with-string-reader ] unit-test | 
					
						
							| 
									
										
										
										
											2009-05-10 19:06:28 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-03 12:39:59 -04:00
										 |  |  | { "hello" } [ "$5\r\nhello\r\n" [ read-response ] with-string-reader ] unit-test | 
					
						
							| 
									
										
										
										
											2009-05-10 19:06:28 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-03 12:39:59 -04:00
										 |  |  | { f } [ "$-1\r\n" [ read-response ] with-string-reader ] unit-test | 
					
						
							| 
									
										
										
										
											2009-05-10 19:06:28 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-03 12:39:59 -04:00
										 |  |  | { { "hello" "world!" } } [ | 
					
						
							| 
									
										
										
										
											2009-05-10 19:06:28 -04:00
										 |  |  |     "*2\r\n$5\r\nhello\r\n$6\r\nworld!\r\n" [ read-response ] with-string-reader | 
					
						
							|  |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-03 12:39:59 -04:00
										 |  |  | { { "hello" f "world!" } } [ | 
					
						
							| 
									
										
										
										
											2009-05-10 19:06:28 -04:00
										 |  |  |     "*3\r\n$5\r\nhello\r\n$-1\r\n$6\r\nworld!\r\n" [ | 
					
						
							|  |  |  |         read-response | 
					
						
							|  |  |  |     ] with-string-reader | 
					
						
							|  |  |  | ] unit-test |