diff --git a/hphp/test/zend/good/ext-standard-file/tempnam_variation5.php b/hphp/test/zend/good/ext-standard-file/tempnam_variation5.php index 61e07c3bd..2d5c12c44 100644 --- a/hphp/test/zend/good/ext-standard-file/tempnam_variation5.php +++ b/hphp/test/zend/good/ext-standard-file/tempnam_variation5.php @@ -8,13 +8,13 @@ $file_path = dirname(__FILE__); echo "*** Test tempnam() function: by passing an existing filename as prefix ***\n"; -$dir_name = $file_path."/tempnam_variation6"; +$dir_name = $file_path."/tempnam_variation5"; mkdir($dir_name); -$h = fopen($dir_name."/tempnam_variation6.tmp", "w"); +$h = fopen($dir_name."/tempnam_variation5.tmp", "w"); for($i=1; $i<=3; $i++) { echo "-- Iteration $i --\n"; - $created_file = tempnam("$dir_name", "tempnam_variation6.tmp"); + $created_file = tempnam("$dir_name", "tempnam_variation5.tmp"); if( file_exists($created_file) ) { echo "File name is => "; @@ -27,7 +27,7 @@ for($i=1; $i<=3; $i++) { unlink($created_file); } fclose($h); -unlink($dir_name."/tempnam_variation6.tmp"); +unlink($dir_name."/tempnam_variation5.tmp"); rmdir($dir_name); echo "\n*** Done ***\n"; diff --git a/hphp/test/zend/good/ext-standard-file/tempnam_variation5.php.expectf b/hphp/test/zend/good/ext-standard-file/tempnam_variation5.php.expectf index abe935123..1a8c9a0b5 100644 --- a/hphp/test/zend/good/ext-standard-file/tempnam_variation5.php.expectf +++ b/hphp/test/zend/good/ext-standard-file/tempnam_variation5.php.expectf @@ -1,9 +1,9 @@ *** Test tempnam() function: by passing an existing filename as prefix *** -- Iteration 1 -- -File name is => %stempnam_variation6%etempnam_variation6.tmp%s +File name is => %stempnam_variation5%etempnam_variation5.tmp%s -- Iteration 2 -- -File name is => %stempnam_variation6%etempnam_variation6.tmp%s +File name is => %stempnam_variation5%etempnam_variation5.tmp%s -- Iteration 3 -- -File name is => %stempnam_variation6%etempnam_variation6.tmp%s +File name is => %stempnam_variation5%etempnam_variation5.tmp%s *** Done *** \ No newline at end of file diff --git a/hphp/tools/import_zend_test.py b/hphp/tools/import_zend_test.py index 9645f2f76..14d468a6e 100755 --- a/hphp/tools/import_zend_test.py +++ b/hphp/tools/import_zend_test.py @@ -405,6 +405,10 @@ def walk(filename, source): file(full_dest_filename+'.expectregex', 'w').write(exp) elif sections.has_key('EXPECTF'): exp = sections['EXPECTF'] + + if '/ext-standard-file/tempnam_variation5.php' in full_dest_filename: + exp = exp.replace('tempnam_variation6', 'tempnam_variation5') + file(full_dest_filename+'.expectf', 'w').write(exp) else: print "Malformed test, no --EXPECT*--: ", filename @@ -525,6 +529,9 @@ def walk(filename, source): test = test.replace('dirname(__FILE__)', '__DIR__."/../../../sample_dir/"') if '/ext-standard-file/lchgrp_basic.php' in full_dest_filename: test = test.replace('symlink.txt', 'lchgrp_basic_symlink.txt') + if '/ext-standard-file/tempnam_variation5.php' in full_dest_filename: + test = test.replace('tempnam_variation6', 'tempnam_variation5') + file(full_dest_filename, 'w').write(test)