mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 08:11:52 +00:00
re-add module focused unicode test
This commit is contained in:
parent
d6561fe7dc
commit
289e382e63
@ -20,20 +20,31 @@ $jscript->unicode = $unicode;
|
||||
# insert unicode via executeString
|
||||
$jscript->executeString("var execStr = {unicode: '" . $unicode . "'}");
|
||||
|
||||
# insert via module loader
|
||||
$jscript->setModuleLoader(function ($path) use ($unicode) {
|
||||
return "module.exports = {unicode: '" . $unicode . "'}";
|
||||
});
|
||||
|
||||
|
||||
# return to php
|
||||
$jscript->executeString("values = {}");
|
||||
$jscript->executeString("values['snapshot'] = snapshot.unicode");
|
||||
$jscript->executeString("values['php'] = php.unicode");
|
||||
$jscript->executeString("values['execStr'] = execStr.unicode");
|
||||
$jscript->executeString("values['module'] = require('module').unicode");
|
||||
|
||||
$values = $jscript->executeString("values");
|
||||
|
||||
echo "snapshot: $values->snapshot\n";
|
||||
echo "php : $values->php\n";
|
||||
echo "execStr : $values->execStr\n";
|
||||
echo "module : $values->module\n";
|
||||
|
||||
?>
|
||||
===EOF===
|
||||
--EXPECT--
|
||||
snapshot: äöüßÜÄÖÜ߀áàâÁÀµ²³▁▂▃▄▅▆▇█ ㌀ ㌁ ㌂ ㌃
|
||||
php : äöüßÜÄÖÜ߀áàâÁÀµ²³▁▂▃▄▅▆▇█ ㌀ ㌁ ㌂ ㌃
|
||||
execStr : äöüßÜÄÖÜ߀áàâÁÀµ²³▁▂▃▄▅▆▇█ ㌀ ㌁ ㌂ ㌃
|
||||
module : äöüßÜÄÖÜ߀áàâÁÀµ²³▁▂▃▄▅▆▇█ ㌀ ㌁ ㌂ ㌃
|
||||
===EOF===
|
||||
|
Loading…
Reference in New Issue
Block a user