Annotation of embedaddon/php/ext/standard/tests/general_functions/bug48660.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #48660 (parse_ini_*(): dollar sign as last character of value fails)
! 3: --FILE--
! 4: <?php
! 5:
! 6: $ini_location = dirname(__FILE__) . '/bug48660.tmp';
! 7:
! 8: // Build ini data
! 9: $ini_data = '
! 10: [cases]
! 11:
! 12: Case.a = avalue
! 13: Case.b = "$dollar_sign"
! 14: Case.c = "dollar_sign$"
! 15: Case.d = "$dollar_sign$"
! 16: Case.e = 10
! 17: ';
! 18:
! 19: // Save ini data to file
! 20: file_put_contents($ini_location, $ini_data);
! 21:
! 22: var_dump(parse_ini_file($ini_location, true, INI_SCANNER_RAW));
! 23: var_dump(parse_ini_file($ini_location, true, INI_SCANNER_NORMAL));
! 24:
! 25: ?>
! 26: --CLEAN--
! 27: <?php @unlink(dirname(__FILE__) . '/bug48660.tmp'); ?>
! 28: --EXPECTF--
! 29: array(1) {
! 30: ["cases"]=>
! 31: array(5) {
! 32: ["Case.a"]=>
! 33: string(6) "avalue"
! 34: ["Case.b"]=>
! 35: string(12) "$dollar_sign"
! 36: ["Case.c"]=>
! 37: string(12) "dollar_sign$"
! 38: ["Case.d"]=>
! 39: string(13) "$dollar_sign$"
! 40: ["Case.e"]=>
! 41: string(2) "10"
! 42: }
! 43: }
! 44: array(1) {
! 45: ["cases"]=>
! 46: array(5) {
! 47: ["Case.a"]=>
! 48: string(6) "avalue"
! 49: ["Case.b"]=>
! 50: string(12) "$dollar_sign"
! 51: ["Case.c"]=>
! 52: string(12) "dollar_sign$"
! 53: ["Case.d"]=>
! 54: string(13) "$dollar_sign$"
! 55: ["Case.e"]=>
! 56: string(2) "10"
! 57: }
! 58: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>