diff options
Diffstat (limited to 'ext/standard/tests/file/fscanf_variation50.phpt')
-rw-r--r-- | ext/standard/tests/file/fscanf_variation50.phpt | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/ext/standard/tests/file/fscanf_variation50.phpt b/ext/standard/tests/file/fscanf_variation50.phpt index 4853ba10ca..6cb8e9fee6 100644 --- a/ext/standard/tests/file/fscanf_variation50.phpt +++ b/ext/standard/tests/file/fscanf_variation50.phpt @@ -53,7 +53,11 @@ foreach($scientific_formats as $scientific_format) { rewind($file_handle); echo "\n-- iteration $counter --\n"; while( !feof($file_handle) ) { - var_dump( fscanf($file_handle,$scientific_format) ); + try { + var_dump(fscanf($file_handle,$scientific_format)); + } catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; + } } $counter++; } @@ -66,7 +70,7 @@ $file_path = __DIR__; $filename = "$file_path/fscanf_variation50.tmp"; unlink($filename); ?> ---EXPECTF-- +--EXPECT-- *** Test fscanf(): different scientific format types with boolean data *** -- iteration 1 -- @@ -148,18 +152,10 @@ NULL bool(false) -- iteration 7 -- - -Warning: fscanf(): Bad scan conversion character " " in %s on line %d -NULL - -Warning: fscanf(): Bad scan conversion character " " in %s on line %d -NULL - -Warning: fscanf(): Bad scan conversion character " " in %s on line %d -NULL - -Warning: fscanf(): Bad scan conversion character " " in %s on line %d -NULL +Bad scan conversion character " " +Bad scan conversion character " " +Bad scan conversion character " " +Bad scan conversion character " " bool(false) -- iteration 8 -- |