Annotation of embedaddon/php/ext/com_dotnet/tests/bug66431_0.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #66431 Special Character via COM Interface (CP_UTF8), Scripting.FileSystemObject
! 3: --SKIPIF--
! 4: <?php
! 5: if (!extension_loaded("com_dotnet")){ echo "skip COM/.Net support not present"; }
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9:
! 10: $text= "Xin chào cộng đồng PHP";
! 11: $fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.txt");
! 12:
! 13: $fso = new COM("Scripting.FileSystemObject");
! 14: $fh = $fso->OpenTextFile($fpath, 2, true);
! 15: $fh->Write($text);
! 16: $fh->Close();
! 17:
! 18: $check_text = file_get_contents($fpath);
! 19:
! 20: $result = ($check_text == $text);
! 21:
! 22: var_dump($result);
! 23:
! 24: if (!$result) {
! 25: echo "Expected: '$check_text'\n";
! 26: echo "Have: '$text'\n";
! 27: }
! 28:
! 29: ?>
! 30: ===DONE===
! 31: --CLEAN--
! 32: <?php
! 33:
! 34: $fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.txt");
! 35:
! 36: if (file_exists($fpath)) {
! 37: unlink($fpath);
! 38: }
! 39: ?>
! 40: --EXPECT--
! 41: bool(true)
! 42: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>