| 
									
										
										
										
											2008-10-08 14:23:23 -04:00
										 |  |  | ! Copyright (C) 2008 Doug Coleman. | 
					
						
							|  |  |  | ! See http://factorcode.org/license.txt for BSD license. | 
					
						
							| 
									
										
										
										
											2010-06-21 13:07:56 -04:00
										 |  |  | USING: kernel math sequences strings tools.test unix.groups ;
 | 
					
						
							| 
									
										
										
										
											2008-10-08 14:23:23 -04:00
										 |  |  | IN: unix.groups.tests | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ all-groups drop ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ t ] [ real-group-name string? ] unit-test | 
					
						
							|  |  |  | [ t ] [ effective-group-name string? ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ t ] [ real-group-id integer? ] unit-test | 
					
						
							|  |  |  | [ t ] [ effective-group-id integer? ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ real-group-id set-real-group ] unit-test | 
					
						
							|  |  |  | [ ] [ effective-group-id set-effective-group ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ real-group-name [ ] with-real-group ] unit-test | 
					
						
							|  |  |  | [ ] [ real-group-id [ ] with-real-group ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ effective-group-name [ ] with-effective-group ] unit-test | 
					
						
							|  |  |  | [ ] [ effective-group-id [ ] with-effective-group ] unit-test | 
					
						
							| 
									
										
										
										
											2008-11-11 14:05:04 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | [ ] [ [ ] with-group-cache ] unit-test | 
					
						
							| 
									
										
										
										
											2009-01-07 17:04:42 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | [ ] [ real-group-id group-name drop ] unit-test | 
					
						
							| 
									
										
										
										
											2009-01-07 17:05:48 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | [ "888888888888888" ] [ 888888888888888 group-name ] unit-test | 
					
						
							| 
									
										
										
										
											2010-06-21 13:07:56 -04:00
										 |  |  | [ f ] [ "please-oh-please-don't-have-a-group-named-this123lalala" group-struct ] unit-test | 
					
						
							|  |  |  | [ f ] [ "please-oh-please-don't-have-a-group-named-this123lalala" group-exists? ] unit-test | 
					
						
							| 
									
										
										
										
											2010-06-17 13:59:19 -04:00
										 |  |  | [ "please-oh-please-don't-have-a-group-named-this123lalala" ?group-id ] must-fail | 
					
						
							| 
									
										
										
										
											2010-06-17 14:20:51 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | [ 3 ] [ f [ 3 ] with-effective-group ] unit-test | 
					
						
							|  |  |  | [ 3 ] [ f [ 3 ] with-real-group ] unit-test | 
					
						
							| 
									
										
										
										
											2010-06-21 13:07:56 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | [ f ] | 
					
						
							|  |  |  | [ all-groups drop all-groups empty? ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ f ] | 
					
						
							|  |  |  | [ all-group-names drop all-group-names empty? ] unit-test |