Skip to content

Commit ef90ad7

Browse files
committed
Revert "Create unicode.php"
This reverts commit 3559f17.
1 parent 33b3ff5 commit ef90ad7

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

tests/unicode.php

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
--TEST
2-
Test V8::executeString() : Check if imported code works with some unicode symbols
2+
Test V8::executeString() : Check if imported code works with umlauts
33
--SKIPIF--
4+
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
5+
--FILE--
46
<?php
5-
# check if v8js was compiled with snapshot support
6-
define('V8_WITH_SNAPSHOT', method_exists("V8Js", "createSnapshot"));
77

88
# maybe more characters (e.g. from http://www.ltg.ed.ac.uk/~richard/unicode-sample.html?)
99
$unicode = 'äöüßÜÄÖÜ߀áàâÁÀµ²³▁▂▃▄▅▆▇█    ㌀ ㌁ ㌂ ㌃';
1010

1111
# insert unicode via snapshot
12-
if (V8_WITH_SNAPSHOT) {
13-
$snapshot = V8Js::createSnapshot("var snapshot = {unicode: '" . $unicode . "'}");
14-
} else {
15-
# argument is only checked for type and further ignored
16-
$snapshot = '';
17-
}
12+
$snapshot = V8Js::createSnapshot("var snapshot = {unicode: '" . $unicode . "'}");
1813

1914
# start V8Js
2015
$jscript = new V8Js('php', array(), array(), true, $snapshot);
@@ -27,12 +22,7 @@
2722

2823
# return to php
2924
$jscript->executeString("values = {}");
30-
if (V8_WITH_SNAPSHOT) {
31-
$jscript->executeString("values['snapshot'] = snapshot.unicode");
32-
} else {
33-
# shim this test
34-
$jscript->executeString("values['snapshot'] = '" . $unicode . "'");
35-
}
25+
$jscript->executeString("values['snapshot'] = snapshot.unicode");
3626
$jscript->executeString("values['php'] = php.unicode");
3727
$jscript->executeString("values['execStr'] = execStr.unicode");
3828
$values = $jscript->executeString("values");
@@ -41,8 +31,8 @@
4131
echo "php : $values->php\n";
4232
echo "execStr : $values->execStr\n";
4333
?>
44-
===EOF===
45-
--EXPECT--
34+
===EOF
35+
--EXPECTF--
4636
snapshot: äöüßÜÄÖÜ߀áàâÁÀµ²³▁▂▃▄▅▆▇█    ㌀ ㌁ ㌂ ㌃
4737
php : äöüßÜÄÖÜ߀áàâÁÀµ²³▁▂▃▄▅▆▇█    ㌀ ㌁ ㌂ ㌃
4838
execStr : äöüßÜÄÖÜ߀áàâÁÀµ²³▁▂▃▄▅▆▇█    ㌀ ㌁ ㌂ ㌃

0 commit comments

Comments
 (0)