| 
									
										
										
										
											2010-11-08 17:18:37 -05:00
										 |  |  | #!/usr/bin/perl | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | open (IN,"ktest.pl"); | 
					
						
							|  |  |  | while (<IN>) { | 
					
						
							| 
									
										
										
										
											2011-12-22 22:06:59 -05:00
										 |  |  |     # hashes are now used | 
					
						
							| 
									
										
										
										
											2010-11-08 17:18:37 -05:00
										 |  |  |     if (/\$opt\{"?([A-Z].*?)(\[.*\])?"?\}/ || | 
					
						
							| 
									
										
										
										
											2011-12-22 22:06:59 -05:00
										 |  |  | 	/^\s*"?([A-Z].*?)"?\s*=>\s*/ || | 
					
						
							| 
									
										
										
										
											2010-11-08 17:18:37 -05:00
										 |  |  | 	/set_test_option\("(.*?)"/) { | 
					
						
							|  |  |  | 	$opt{$1} = 1; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | close IN; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | open (IN, "sample.conf"); | 
					
						
							|  |  |  | while (<IN>) { | 
					
						
							| 
									
										
										
										
											2011-12-22 22:06:59 -05:00
										 |  |  |     if (/^\s*#?\s*([A-Z]\S*)\s*=/) { | 
					
						
							| 
									
										
										
										
											2010-11-08 17:18:37 -05:00
										 |  |  | 	$samp{$1} = 1; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | close IN; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | foreach $opt (keys %opt) { | 
					
						
							|  |  |  |     if (!defined($samp{$opt})) { | 
					
						
							|  |  |  | 	print "opt = $opt\n"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | foreach $samp (keys %samp) { | 
					
						
							|  |  |  |     if (!defined($opt{$samp})) { | 
					
						
							|  |  |  | 	print "samp = $samp\n"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |