| 
									
										
										
										
											2019-10-08 18:12:54 +05:30
										 |  |  | import * as config from '../src/config'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | describe('Config tests', () => { | 
					
						
							| 
									
										
										
										
											2021-09-09 07:08:12 +05:30
										 |  |  |   it.each`
 | 
					
						
							| 
									
										
										
										
											2022-01-29 05:29:58 +05:30
										 |  |  |     ini_values    | os           | output | 
					
						
							| 
									
										
										
										
											2021-09-09 07:08:12 +05:30
										 |  |  |     ${'a=b, c=d'} | ${'win32'}   | ${'Add-Content "$php_dir\\php.ini" "a=b\nc=d"'} | 
					
						
							|  |  |  |     ${'a=b, c=d'} | ${'linux'}   | ${'echo "a=b\nc=d" | sudo tee -a "${pecl_file:-${ini_file[@]}}"'} | 
					
						
							|  |  |  |     ${'a=b, c=d'} | ${'darwin'}  | ${'echo "a=b\nc=d" | sudo tee -a "${pecl_file:-${ini_file[@]}}"'} | 
					
						
							| 
									
										
										
										
											2021-09-09 07:19:49 +05:30
										 |  |  |     ${'a=b & ~c'} | ${'win32'}   | ${'Add-Content "$php_dir\\php.ini" "a=\'b & ~c\'"'} | 
					
						
							|  |  |  |     ${'a="~(b)"'} | ${'win32'}   | ${'Add-Content "$php_dir\\php.ini" "a=\'~(b)\'"'} | 
					
						
							|  |  |  |     ${'a="b, c"'} | ${'win32'}   | ${'Add-Content "$php_dir\\php.ini" "a=b, c"'} | 
					
						
							| 
									
										
										
										
											2021-09-09 07:08:12 +05:30
										 |  |  |     ${'a=b, c=d'} | ${'openbsd'} | ${'Platform openbsd is not supported'} | 
					
						
							| 
									
										
										
										
											2022-01-29 05:29:58 +05:30
										 |  |  |   `('checking addINIValues on $os', async ({ini_values, os, output}) => {
 | 
					
						
							|  |  |  |     expect(await config.addINIValues(ini_values, os)).toContain(output); | 
					
						
							|  |  |  |   }); | 
					
						
							| 
									
										
										
										
											2019-10-08 18:12:54 +05:30
										 |  |  | }); |