<?php

$specimem='string:{"`Hello, World!`"|escape:"javascript"}';

$reference="\\`Hello, World!\\`";

set_include_path('/usr/share/php/smarty3/');

require('Smarty.class.php');

$tpl = new Smarty();
$test = $tpl->createTemplate($specimem);

$output =$tpl->fetch($test);

print("EXPECTED: $reference\n");
print("ACTUALLY: $output\n");

assert(0==strcmp($output,$reference));

if(0!=strcmp($output,$reference)) {
  print("NOT EQUAL\n");
  exit(1);
}

