mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 10:56:12 +01:00 
			
		
		
		
	 1300627a5d
			
		
	
	
	1300627a5d
	
	
	
		
			
			* don't use Env module in tests, use $ENV{xxx} instead
* collateral changes:
** $file in the error message was unset
** $file in the other error message was unset too :)
** source file arguments are conventionally upper-cased
** abort the test (die) on error, don't just echo/exit
		
	
			
		
			
				
	
	
		
			11 lines
		
	
	
	
		
			224 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			224 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| # truncate a giving file, all contents of the file are be cleared
 | |
| 
 | |
| if (!$TRUNCATE_FILE)
 | |
| {
 | |
|   die TRUNCATE_FILE is not set;
 | |
| }
 | |
| 
 | |
| perl;
 | |
| open FILE, '>', $ENV{TRUNCATE_FILE} or die "open(>$ENV{TRUNCATE_FILE}): $!";
 | |
| close FILE;
 | |
| EOF
 |