App-CSE
view release on metacpan or search on metacpan
t/05-more-search.t view on Meta::CPAN
{
## Searching for pythonesque
local @ARGV = ( '--idx='.$idx_dir, 'pythonesque');
my $cse = App::CSE->new();
is( $cse->command()->execute(), 0 , "Ok execute has terminated just fine");
ok( $cse->command()->hits() , "Ok got hits");
is( $cse->command()->hits()->total_hits() , 1, "Ok got one hit");
}
{
## Searching for hypertext (from the XHTML file).
local @ARGV = ( '--idx='.$idx_dir, 'HyperText');
my $cse = App::CSE->new();
is( $cse->command()->execute(), 0 , "Ok execute has terminated just fine");
ok( $cse->command()->hits() , "Ok got hits");
is( $cse->command()->hits()->total_hits() , 1, "Ok got one hit");
}
{
## Searching for this_is_an_html_file (from the HTML file).
local @ARGV = ( '--idx='.$idx_dir, 'This_is_an_html_file');
t/toindex/xml/valid.xhtml view on Meta::CPAN
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>XHTML 1.0 Strict Example</title>
<script type="application/javascript">
<![CDATA[
function loadpdf() {
document.getElementById("pdf-object").src="http://www.w3.org/TR/xhtml1/xhtml1.pdf";
}
]]>
</script>
</head>
<body onload="loadpdf()">
<p>This is an example of an
<abbr title="Extensible HyperText Markup Language">XHTML</abbr> 1.0 Strict document.<br/>
<img id="validation-icon"
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0 Strict"/><br />
<object id="pdf-object"
type="application/pdf"
data="http://www.w3.org/TR/xhtml1/xhtml1.pdf"
width="100%"
height="500"/>
</p>
</body>
</html>
( run in 1.884 second using v1.01-cache-2.11-cpan-49f99fa48dc )